Quantcast
Channel: SalesLogix – Customer FX
Viewing all 169 articles
Browse latest View live

Resizing a Editable Grid in the Infor CRM Web Client

$
0
0

The web client’s editable grid does not resize well when you expand a tab that the grid may exist on. You end up with a lot of white space at the bottom of the grid where you could be showing data from the grid. Unfortunately the architecture of the tab workspace does not offer an easy way to automatically hook into the tab drag events to be able to resize a grid automatically. This post will give you a way to do it manually, by adding a toolbar button above the grid that the user can click to allow the grid to fill the available space that the tab occupies.

Lets take a look at step by step how to do this.
First open the quickform in the Application Architect.
On the Toolbar above the grid, right click and choose Add Control Button…Button.
Set the properties as follows:

  • Button Type- Icon
  • Caption- Resize
  • Image- Pick an appropriate image
  • ToolTip- Resize the Grid
  • On Client Click- return resizeGrid();

Now on the form, choose Load Actions. Add a new load action, action of C# Snippet Action Item. Set the On Repaint Event to True.

Now lets get into the code:
The first bit of code we will use is this:

        string gridID = string.Empty;
        foreach (Control c in Controls)
        {
            var cont = c as ScriptResourceProvider;
            if (cont != null)
            {
                gridID = cont.ID.Replace("_Strings","");
                break;
            }
        }

What we are doing here is getting the control added to the page as part of the editable grid deployment which is a ScriptResourceProvider. We do this because the ID of this control happens to be close to what we need for the rest of our code and is based on the tab name and grid control name. We strip of the “_Strings” part of the ID returned and set that as our gridID variable.

The next part of code constructs a javascript function which will be injected onto the page. The function basically does 4 things:
1 Gets the grid DOM element, it’s parent div (with an ID ending in _Container), and the grid header div (ID ending in _HeaderBar).
2 Calculates the size available using the window.innerHeight and then subtracting the Y position of the header div, the height of the header div, and an extra 10 pixels.
3 With the calculated height it then sets the height style attribute of both the grid and it’s parent div.
4 Using dojo, gets the instance of the dojo grid control and then calls the grid’s resize and update methods which actually sizes the grid into the resized div controls.

Here is the code:

        string jscript = @"function resizeGrid() {
        var gridid = '" + gridID + @"';
        var parentgrid = document.getElementById(gridid + '_Container');
        var griddiv = document.getElementById(gridid );       
        var headerdiv = document.getElementById(gridid + '_HeaderBar');
        var h = window.innerHeight;
        var w = headerdiv.clientHeight
        var t = headerdiv.getBoundingClientRect().top;    
        var newheight = h - t - w - 10;    
        griddiv.style.height = newheight + 'px';
        parentgrid.style.height = newheight + 'px';    
        var grid = dijit.byId(gridid);
        grid.resize();
        grid.update();
        return false;}";        

Next we create another javascript string we will also inject on the page. This one uses the dojo ready event which will automatically run our resize code when the page loads.

        string jscript2 = @"var resizeTimeoutId;
            require(['dojo/ready'], function (ready) {
            ready(function () {
                window.clearTimeout(resizeTimeoutId);
	                resizeTimeoutId = window.setTimeout('resizeGrid();', 300);
            });
        });";

Finally we inject our javascript onto the page:

        ScriptManager.RegisterStartupScript(Page, GetType(), "FXResizer", jscript, true);
        ScriptManager.RegisterStartupScript(Page, GetType(), "FXResizer2", jscript2, true);

Now when our tab is opened it will automatically resize the grid to fit. Also we have allowed the user to manually call resize by the toolbar button that we added to the page, which will call the resizeGrid() function injected to the page. This allows for them to resize the grid after the do things client side, like dragging tabs around and things.

A word of warning, this code will not work if the user drags the tab to the middle view. This assumes the tab is on the normal row of tabs along the bottom.


Passing Values from Client-Side Javascript to Server-Side C# Actions in Infor CRM Web

$
0
0

There are more and more parts in Infor CRM (Saleslogix) that use client-side code, however, the application itself does still rely heavily on C# server-side actions in postbacks for most of the heavy work. Mixing the two worlds can sometimes be necessary to have things work seamlessly.

Passing values from your client-side code to the server-side code can easily be done using the ClientContextService. There are both Javascript & C# versions of the ClientContextService and they both share the same data. You can use the Javascript ClientContextService and add & remove values and in your server-side code you can use the .NET ClientContextService to do the same. You can set values in Javascript and read them from C# and also set values in C# and read them in your Javascript code. Let’s take a look at how it works.

The ClientContextService

The following Javascript sets some values in the context service:

// get the context service
var context = Sage.Services.getService('ClientContextService');
// check if our value already exists. If so, update it, if not add it
if (context.containsKey('Foo')) {
    context.setValue('Foo', 'Hello from the other side');
}
else {
    context.add('Foo', 'Hello from the other side');
}

This C# code in a postback reads the values set from the Javascript code above:

// get the context service 
var context = PageWorkItem.Services.Get<Sage.Platform.WebPortal.Services.ClientContextService>();
if (context.CurrentContext.ContainsKey("Foo"))
{
    var fooValue = context.CurrentContext["Foo"];
    // do something with fooValue...
}

We could easily do the same to make values available in our Javascript code from C#.

TaskCentre and Infor CRM (Saleslogix) – Bringing People, Systems, and Information Together

$
0
0

There is still time to register for Wednesday’s webinar!

Did you know that it is possible to get workflow, document automation, web content publishing, data integration, business alerts, and subscription capabilities all in one software package? You can with TaskCentre, a Business Process Management Suite that integrates seamlessly with Infor CRM (Saleslogix).  Join us on Wednesday, June 22nd at 2pm CDT and learn how integrating TaskCentre with Infor CRM will help you to bring people, systems, and information together.

Learn more and register now!

-Brianna

Using Selected Rows in an Editable Grid in a Server-Side C# Action in Infor CRM Web

$
0
0

In my previous article I discussed using the ClientContextService to pass values from client-side code to a server-side C# action. We will use that idea here to allow a server-side C# action to know which rows are selected in an Editable Grid.

The Editable Grid control in Infor CRM isn’t an ASP.NET control. Instead, it adds Javascript to create a completely client-side Dojo grid that uses SData. It’s a 100% client-side control. This means, if you want to use it from a server-side action you’re out of luck. However, using the ClientContextService you can pass information from client-side code to your server-side action, allowing the C# code to work with the Editable Grid.

In this scenario, we have an Editable Grid, with standard buttons next to it to perform actions on the rows selected by the user. The buttons have C# actions to perform updates and other actions on the selected rows in the grid. The user can select one, or many, rows and click one of the buttons to trigger a postback and perform some actions. The tricky part is, we need to let our server-side C# action know which grid rows the user has selected.

The first step is, we need to wire up some Javascript to the OnClientClick of the buttons. The OnClientClick Javascript code executes prior to the postback. We can return true or false to allow, or prevent, the postback from occurring. In the code below we get the selected rows from the Editable Grid and then set it in the ClientContextService. If no rows are selected, we alert the user and return false and everything stops (the C# action will not execute).

The following code is in a LoadAction to wire up the Javascript to the OnClientClick of our button.

// first we need to determine the client-side name of our Editable Grid
var gridId = string.Empty;
foreach (Control ctrl in Controls)
{
    var resCtrl = ctrl as ScriptResourceProvider;
    if (resCtrl != null)
    {
        gridId = resCtrl.ID.Replace("_Strings","");
        break;
    }
}

// this is the client-side script. In this code, we get a reference to the grid
// and then get the selected rows. We set the selected rows in the client context
// service. If no rows are selected we alert the user.
var script = @"var grid = dijit.byId('{0}'), 
				   selectedIds = grid.selection.getSelected().map( function(row) { return row.$key; }).join(); 

			   if (selectedIds != '') { 
				   var context = Sage.Services.getService('ClientContextService'); 
				   context.remove('SelectedGridRows'); 
				   context.add('SelectedGridRows', selectedIds); 
				   return true; 
			   } 
			   else { 
				   alert('There are no selected rows.'); 
				   return false; 
			   } ";

// now wire up the OnClientClick of our button 
button1.OnClientClick = string.Format(script, gridId); 

Now, when our button is selected, the Javascript we wired up to the button will execute and the ID’s of the selected rows will be added to the client context service. Now, in the code for the button, we can use the client context service to get the IDs of the selected rows. The code for the button will look like this:

var contextService = PageWorkItem.Services.Get<Sage.Platform.WebPortal.Services.ClientContextService>();
if (contextService.CurrentContext.ContainsKey("SelectedGridRows"))
{
	var selectedIds = contextService.CurrentContext["SelectedGridRows"].Split(',');
	// now the selectedIds variable is an array of the ID values of the selected rows
	// we can loop through them and do whatever is needed
	
	// for example:
	foreach (var id in selectedIds)
	{
		// this is just an example...
		var contact = Sage.Platform.EntityFactory.GetById<Sage.Entity.Interfaces.IContact>(id);
		contact.Status = "Something";
		contact.Save();
	}
}

Not too bad. It gets the context of the selected Editable Grid rows back to C# so you can do anything you’d like at that point.

Inforum 2016 is 16 Days Away!

$
0
0

July 10th – 13th.  Have you registered?

Inforum 2016 is taking place in New York City and it’s an event you don’t want to miss!  Whether you only use Infor CRM, or you use a whole suite of Infor products, this conference is sure to be beneficial.  Not only can you tailor your agenda with the Inforum Agenda Builder to make sure you are participating in the sessions that are the most important to your goals (Infor CRM roadmap, demonstrations of the newest Infor CRM features, Infor CRM add-on products – to name a few), but you will have a chance to try out new technologies, learn about Infor’s strategy, and network with your peers.  You’ll also get to see Maroon 5 at the Customer Appreciation Party.  And if that doesn’t convince you, here is something that will – meet and hangout with Customer FX’s very own Scott Weber.  Just look for this guy:

Scott Weber

Don’t be shy, he’d be happy to meet you!

Convinced that you need to go to Inforum 2016?  (It was the chance to meet Scott, wasn’t it?)

Learn more and register here.

-Brianna

 

Access to InforCRM (formerly SalesLogix) 8.x Application Architect

$
0
0

In the unusual circumstance where you as the INFORCRM admin need to grant access to the Application Architect, but do not want to hand out the Admin password we have a workaround.
Open up the Administrator and use the sql option to update the usersecurity table. Change the type to “W” for the user and this will allow log on to Application Architect.

Here is an example:
select type from usersecurity where usercode =’craigc’ —make a note of the type
update usersecurity set type =’W’ where usercode =’craigc’

Change type back to the original value and you have locked out Application Architect again.

Unable to Run Jobs in the Job Manager

$
0
0

I had a customer today that was unable to run jobs from the Job Manager.  The error they continued to get each time was an authentication error:

DB_SEC_E_AUTH_FAILED(0x80040E4D

After a lot of checking and rebooting , the simple answer is that the “Use Windows Authentication” checkbox was not checked in the Infor CRM Administrator program.

You can find this in Administrator….Tools/Options/Passwords…”Use Windows Authentication”.

Check this box and restart your Infor CRM Job Server Service.  Then log into your Web client and retry the Job Manger Jobs.

 

Infor CRM 8.3 Upgrade – Issues with Proper Schema Creation in the Database

$
0
0

We recently ran into an issue when upgrading a customer to 8.3 that I wanted to discuss as it is a potentially big issue that could prevent an upgrade from working correctly, despite no warnings or error messages to alert you.

One of the first steps to upgrading is to install the 8.3 VFS project and to check the “Rebuild schema from project” when you do the restore. This checkbox adds a step which uses the entity model to “back fill” any missing database components. For instance the 8.3 project backup adds a bunch of new fields to a lot of tables (See the Upgrading to Infor CRM v8.3.pdf, starting on page 61). In the upgrade, these new database elements are simply added as properties to the entity model. By checking the Build Schema checkbox what you are really telling the system is to use the entity model as the master schema definition, and generate any missing components into the database that exist in the entity model but not the database.

This rebuild schema option is also available under the Tools menu in the Application Architect.

When running the Rebuild Schema step a message box will show saying “Gathering Managed Entities”. Also, in the Output window you will get details listed of what is is doing.

While there were no errors or warnings logged, there was an “info” message that revealed a problem:

INFO  - ALTER TABLE ALTER COLUMN CITY failed because one or more objects access this column. : The object ‘V_Opportunities’ is dependent on column ‘CITY’. : The object ‘AKS_Opportunities’ is dependent on column ‘CITY’.

The customer’s database we were upgrading had SQL views with Schema Binding enabled. Normally the schema update process is the following for tables:
INFO – Inspecting schema for Address
INFO – Checking Address for Schema changes
INFO – Removing indexes for CITY
INFO – Removing indexes for STATE
INFO – Recreating Indexes for ADDRESS
INFO – Schema changes applied for Address

Because the SQL error was happening, it was not ever reaching the point where it altered the Address table. Therefore ADDRESS5, ADDRESS6, COUNTRYCODE and ENTITYTYPE were never added.

By looking at the output window I found similar messages for other tables as well. The end result was that the new database schema elements that were supposed to be created in some tables were not.

Hopefully Infor will address this and actually report this kind of stuff as errors during this rebuild schema routine so that errors are properly reported as such and occur when restoring the project with that checkbox on or when using the menu item.

While this particular client had a problem with address fields being created, it could potentially be an issue with any of the tables in the system. Without an error being reported it is very likely people will have no idea a problem occurred or that their DB was not properly upgraded until later.

So read those output window messages. Even output that doesn’t show as an error or warning can actually be telling you of a problem.


Infor CRM Web Client – Using Style Attributes to Manipulate Control Appearance

$
0
0

With how the quick forms are constructed into asp.net user controls when the web client is deployed, it can be difficult to manipulate the appearance of controls since they exist within unnamed divs and table elements. There are some cases where you can implement custom style attributes to a control to make them appear in ways you may want. You can add this kind of code to the load action of the quick forms.

For instance, if you have 2 controls side by side and you want to overlay one control on top of the other, you could do something like this:

lblAgentNumber.Attributes.Add("Style", "position:relative;left:-65%;");

Infor CRM Style 1

To make a label stretch across the top of the screen and have a red background, you could do this:

QFLabel.Attributes.Add("Style", "background-color:red; position:absolute;left:0;right:0;");

Infor CRM Style 2

To make a label box occupy more space instead of having such a large part of the screen taken up by the label:

QFTextBox.Attributes.Add("Style", "position:relative;left:-30%; width:130%");

Infor CRM Style 3

Infor CRM 8.3 French and German Language packs released

$
0
0

Now Available for download from the Infor Xtreme Portal are the Infor CRM 8.3 French and German Language packs.

So, crm infor heureux and glücklich infor crm

 

Infor CRM Mobile 3.4.2 has been released

$
0
0

Now available for download is the latest release of Infor CRM mobile; 3.4.2 for 8.0 or later.  You can get it from the Infor Xtreme Portal in the Downloads/Products section.  Included is the installation files and Implementation guide.  Be sure and read the prerequisites before installing.

This appears to be a maintenance release so to see a complete listing of all of the changes and fixes, go to this Github site.

HTTP Request error with Crystal Reports in InforCRM

$
0
0

I bumped into an issue today with a Crystal Report that would not run.  It had ran previously and other reports in the system were running fine.

wut?

unknown error

Checking the event log showed this error:

ERROR Quartz.Core.ErrorLogger – Job SlxJobService.Saleslogix.Reporting.Jobs.CrystalReportsJob threw an exception.
Quartz.SchedulerException: Job threw an unhandled exception. —> Saleslogix.Reporting.Jobs.ReportingJobContextException: The Crystal Reports Job has failed. —> CrystalDecisions.Shared.CrystalReportsException: The report may have invalid schema. Validate the tables, fields, and procedures in the main report document and all subreports. —> System.Runtime.InteropServices.COMException: The system cannot find the path specified. at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)

What the… ??  Considering what I was doing, none of this made any sense.  My report was correct.  It ran fine outside of InforCRM, and Validating items in Crystal showed all items as valid.

The problem was due to a comment I had in the record selection formula.  Apparently, if you have commented-out code with no other text, the report cannot be run from InforCRM.

This is a problem

Apparently, this is an issue now.

To get around this, you have a couple options.  First of all, you could remove the commented-out code.  If the Record selection criterion is empty, then there is no issue.  If, however; you want to keep that information there (like in my case, to save testing code), then you can also add something after the comment that would resolve as “True” in crystal.  As long as it has something valid, it should be fine.

This works

So, adding something like “1=1”  Should come up as valid (no errors found), and will allow the report to run from InforCRM while also keeping your comments.

Thanks for reading!

Infor CRM News You Can Use – August 2016

$
0
0
The Customer FX Newsletter highlights our monthly webinar, free training, important information about Infor CRM and industry news, as well as popular blog posts.  If you would like this information delivered right to your inbox sign up now!   Duplicate records in Infor CRM? Let’s talk about prevention and cure.  Keep your system duplicate free […]

Restricting the Related Assets SData Lookup for Tickets in the Infor CRM (Saleslogix) Web Client

$
0
0
When associating a related asset to a ticket in the Infor CRM Web Client (Saleslogix), the out of the box behavior will show all assets in the system in the lookup to select an asset. This doesn’t make a whole lot of sense for most people since they usually want to relate an asset that […]

Salesfusion Webinar: Marketing Automation and CRM Integration

$
0
0
Thursday, November 3rd at 1pm CT. You may not know this, but marketing automation platforms and CRM go together like peanut butter and jelly.  Like salt and pepper.  Like coffee and mornings.  Simply put, they are meant for each other, and in a couple weeks Salesfusion is going to show how pairing the two will help […]

How to Import Data Into Infor CRM (Saleslogix) Using SQL Server Integration Services (SSIS) With Auto-Generated Table ID Values

$
0
0
Importing data into Infor CRM (Saleslogix) is a task that is typical for any system. However, sometimes the custom format table ID values are a roadblock in using standard, or widely used tools to do the job. In this article I will look at creating a simple data import using SQL Server Integration Services (SSIS) […]

Loading Custom Javascript and Style Files in Infor CRM (Saleslogix) Web Without Modifying Master Pages

$
0
0
Usually when you create custom Javascript or CSS stylesheet files for Infor CRM, you have to modify the master pages to load your scripts or stylesheets. The problem with this is that you’ve now touched one more thing that you need to worry about in an upgrade. There’s a lot of stuff going on in […]

InforCRM V8.x Customer Portal File Attachment Upload Fails With Error 405

$
0
0
We had not seen this error in the InforCRM Customer Portal until recently, and the befuddling aspect was the SLXClient attachment upload worked perfectly. The Application Architect setup was checked and IIS was setup and running with the WebDll user running the CustomerPortal application and web pool.

Infor CRM 8.2 Web Client Fails to Delete Attachment

$
0
0
When attempting to delete and attachment using the Infor CRM 8.2 Web Client, you may get an error that the "requested value 'Modified' was not found." This occurs when values for RemoteAttachments.Status in the underlying database are not correct.

Adding Attachments to a Custom Entity in Infor CRM (Saleslogix) Web

$
0
0
Adding support for attachments to a custom entity in Infor CRM Web is a pretty simple task as long as you know what the steps are. Luckily, the out of the box attachments SmartParts is built in a way to make it work with new custom entities without customization. It takes only 2 easy steps. […]
Viewing all 169 articles
Browse latest View live