back to top

Adding Yes/No display for boolean fields in InforCRM (SalesLogix) datagrids

InforCRM has had the ability to define boolean entity properties as either True/False or Yes/No for a long time, however in a recent project, I found that displaying such an entity property as a bound field in a Data Grid would always display True or False (or nothing, if not set) regardless if it was set as a Yes/No data type.

In this project, the client wanted to display either Yes or No in the datagrid.  I also wanted to account for unset values, showing “No” if the underlying property was null.  To accomplish this, I turned to a Custom Format column in the datagrid.

Ryan previously posted a great article describing how to use of custom format columns to link to external sites, and I did something similar to display my desired values.

In the datagrid properties, I added a new Custom Format column, set the datafield to my boolean entity property and gave the method I was going to create a name of booleanDisplay in the Format Method Name property.  For the actual method, I included the following:

protected string booleanDisplay(object boolValue)
{
    bool val;
    if (boolValue != null)
    {
        val = (bool)boolValue;
    }
    else
    {
        val = false;
    }

    if (val)
    {
        return "Yes";
    }
    else
    {
        return "No";
    }
}

A couple notes on that code:  The method defined will always need an Object defined as the method parameter.  This required me to then check to see if the property had passed a null to the method.  If not, I cast the value to a new boolean variable. If it is null, I set the boolean variable to false.  Once I had my boolean variable, I simply had to evaluate it and return a “Yes” if true, or “No” if false.

All in all, this was a very simple way to evaluate a boolean entity property, and return Yes or No (or any value, really) based on the result, while also accounting for a potentially null value in the entity property.

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
Jason Buss
Jason Buss
Jason is a senior application developer with Customer FX.

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