back to top

Utilizing the Picklist assembly to get Picklist details in SalesLogix 7.5 Web

While there are many ways of querying data in the SalesLogix entity model, including using the DataServices, or IQuery to run a direct query to the database, SalesLogix also has provided a Picklist assembly for working specifically with picklists.  If you take a look at the entity model you will notice that there is no IPicklist assembly.  Working with Picklists are a common enough thing for any SalesLogix developer.  Wether it be populating a control with picklist values or doing a lookup to get picklist’s text, short text, picklistid, or itemid values, all of these things can be accomplished by using the Sage.SalesLogix.Picklists assembly.


The picklist assembly defines a Picklist class (Sage.SalesLogix.PickLists.PickList).  This class exposes the typical properties about a picklist entity including:



  • Code

  • CreateDate

  • CreateUser

  • DefaultIndex

  • Id (same as ItemId)

  • ItemId

  • ModifyDate

  • ModifyUser

  • PicklistId

  • Shorttext

  • Text

  • UserId

It also contains several methods that can be called to return a specific Picklist object or a collection of them.


Lets take a look at one I recently had to use.


In the Support area of SalesLogix (Tickets in particular) there are several fields that store the picklist code rather than the text value.  One of these is Ticket Status.


Now if you tried to run a server side script to get the contents of the Ticket Status’ picklist such as



if(pklStatusCode.PickListValue == “Open”)


It would never return true.  This is because since the picklist stores the picklist code instead of the text, what it actually would need to say is



if(pklStatusCode.PickListValue == “k6UJ9A000039”)


In this example the ID represents the picklist’s ItemId value, which is the unique value for the item in the picklist table. Since picklist ItemID’s can be different between databases (They are sequentially generated at the time the picklist entry is created based on the key index of the database at the time) it is not a good idea to hard-code a specific value.


So how can we do a quick lookup to get what the correct ItemID value is?  Use the Sage.SalesLogix.PickLists assembly, of course!


Lets take a look at one method in particular, called “GetPicklistItemByName”.  This method accepts two inputs, the name of the picklist containing the value you want to query and the text value of the item you want to query.  It ouputs a Sage.SalesLogix.Picklists.Picklist object.  Lets take a looks:



Sage.SalesLogix.PickLists.PickList er = Sage.SalesLogix.PickLists.PickList.GetPickListItemByName(“Ticket Status”,”Closed”);


So in this sample I am going to get a Picklist object returned to me that represents the picklist item in the “Ticket Status” picklist where the item’s text = “Closed”.  Now with my object I can then query any of its attributes.  Here is full sample:



Sage.SalesLogix.PickLists.PickList er = Sage.SalesLogix.PickLists.PickList.GetPickListItemByName(“Ticket Status”,”Closed”);
if( pklStatusCode.PickListValue == er.ItemId)


There you have it.  A very easy way of getting the picklist details about a particular item.  Spend some time looking at this assembly.  There is a lot it can offer when you need to work with picklists.

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
Kris Halsrud
Kris Halsrud
Kris Halsrud is a Senior Analyst / Developer for Customer FX Corporation.

1 COMMENT

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