back to top

Custom Format Columns in SalesLogix Web (and Linking to External Sites in a DataGrid)

There might be times when you need to do some custom formatting in SalesLogix DataGrids that goes way beyond just simple formatting. A perfect example of this is taking a simple value, such as an indentifier from another external system where you want the value in the DataGrid to be a part of a hyperlink to this other system. In this scenario, you might have a value like “12345”, which identifies a matching record in another system and you want this to become a value like the following in the grid:

<a href="http://theothersystem.com/something?id=12345">12345</a>

This is where the CustomFormatColumn column type comes in. The problem is that this column type can be a little confusing and not well documented.

In this scenario, we’ll just use a sample of adding a hyperlink into the Account Contacts grid to do a Google search on the contact’s full name. Not really useful, I know, but it will serve the purpose of demonstrating how to use a CustomFormatColumn.

Basically, the way that a CustomFormatColumn works is you create your own custom C# function. The value, from each row, in the grid is passed into your function. You do whatever you need to do with the value in your code and then return the result, which is what will appear in the grid.

In the DataGrid on the AccountContacts QuickForm, add a CustomFormatColumn. There are four properties we’ll need to make sure we set.

  1. ColumnHeading = The title or caption for the column.
  2. DataField = This is field/property on the entity that you want passed into your function. For our example, we’ll pass in the contact’s FullName property.
  3. FormatMethodName = This is the name that you’ll be calling your function. For our example, we’ll call our function “GoogleLink”
  4. FormatCode = This is the C# code to do what is needed to the value so it displays the way you want in the grid. See the code for our example below:
protected string GoogleLink(object name)
{
return string.Format("<a href="http://www.google.com/search?q={0}" target=_blank>{0}</a>", name);
}

One thing to point out here, the parameter getting passed in will need to be an object and you’ll be returning a string. Also, you must include the complete function signature with the method name matching (case-sensitive) the name you have in the FunctionMethodName property. The properties for our CustomFormatColumn will look as follows:

The thing that will look weird, is the code in the Format Code property. As I mentioned before, you must include the complete signature of the function. The code window, however, will try to tell you that the code is not valid and it will appear as if you’re adding a function into a function, but you’re not. The code you type into this window will get added to the SmartPart and the grid column will wrap itself in the function call. You can see the weirdness I am referring to in the screenshot:

Notice the red squigglies and the apparent method signature at the top of the window. Ignore those. You’re doing just fine. After deploying, you can see the final result. A link in our grid that will launch a new window and take you to a search results page on Google.

 

A bit more real world, this would be another web app showing some details for that contact, like maybe products purchased or something from an accounting system. You can go far beyond simple formatting with this. If we wanted, we could pass in some identifier from the other system and then grab a value from that system’s database or via a web service call to get some value to show in the grid. However, beware, that while that is possible, keep in mind that this will execute for each row in the grid, delaying the load time for the grid and SmartPart so use discretion when moving beyond simple formatting.

Contact Customer FX for your CRM project
We let our expertise speak for itself - let us know how our all-star team can help on your CRM project
About the Author
Ryan Farley
Ryan Farleyhttps://customerfx.com/article/author/ryanfarley/
Ryan Farley is the Director of Development for Customer FX and creator of slxdeveloper.com. He's been blogging regularly about SalesLogix, now Infor CRM, since 2001 and believes in sharing with the community. His new passion for CRM is Creatio, formerly bpm'online. He loves C#, Javascript, web development, open source, and Linux. He also loves his hobby as an amateur filmmaker.

2 COMMENTS

  1. Is it correct that “custom format” columns have now been migrated into columns that allow a custom format function? Like the “Editable field” column? (We are running a current 8.3 web only environment)

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Infor CRM Sync for Exchange: Action Required by August 31, 2026

Using Infor CRM Sync for Exchange with Microsoft 365? Your Exchange administrator must update tenant settings by August 31, 2026 to prevent sync disruption.

[Webinar] What’s Coming Next for Infor CRM SLX and Why v10 Matters

See what’s coming next for Infor CRM SLX, including new marketing workflows, automation improvements, and reasons to consider upgrading to v10.

Disable Caching in Infor CRM SLX Web Client

In the rare case caching is causing issues in the Infor CRM SLX web client, it is possible to disable specific types of caching by making edits using Application Architect, and then deploying.

Exploring AI Options for Infor CRM v10

I've started taking a closer look at the AI capabilities built into Infor CRM v10. Over the next several posts, I'll share what I learn. From the built-in features and supported AI providers to implementation considerations, costs, and practical use cases.

Infor CRM SLX 10.0: Delegate Ownership Changes for “Everyone” Records

Learn how the new EveryoneOwnerAssignment secured action in Infor CRM SLX 10.0 allows designated users to change ownership of Everyone-owned records without requiring Administrator access.

Related Articles

Infor CRM Sync for Exchange: Action Required by August 31, 2026

Using Infor CRM Sync for Exchange with Microsoft 365? Your Exchange administrator must update tenant settings by August 31, 2026 to prevent sync disruption.

[Webinar] What’s Coming Next for Infor CRM SLX and Why v10 Matters

See what’s coming next for Infor CRM SLX, including new marketing workflows, automation improvements, and reasons to consider upgrading to v10.

Disable Caching in Infor CRM SLX Web Client

In the rare case caching is causing issues in the Infor CRM SLX web client, it is possible to disable specific types of caching by making edits using Application Architect, and then deploying.

Exploring AI Options for Infor CRM v10

I've started taking a closer look at the AI capabilities built into Infor CRM v10. Over the next several posts, I'll share what I learn. From the built-in features and supported AI providers to implementation considerations, costs, and practical use cases.

Related Videos