Using Picklist in Integrations- After Spring 17 Release

In integrations mainly information is communicated to other System by passing id/code values instead of Labels. In Salesforce picklist has values and labels but before Spring 17 release there was not provision to have different value and label for picklist items.

Whenever different Label has to be shown to user and different code has to be passed to other system then some workarounds were required to be done like having code label mapping in code or keeping code values in custom object and passing those values in integrations. Such solutions were error prone and requires maintenance since in code it is required to do String comparison to get the proper code to be sent to other system.

Now we have a relief, in Sprint 17 salesforce has provided much required feature where we can have separate code and label for picklist items.

picklistvaluelable

Different code and label

picklistvaluevslabelincode

Apex code showing how to get Label and Code which could be used while passing data in integrations to other system

Now using this we could minimize the extra maintenance which was required initially. This is a great feature and should be considered in integrations.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: