function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ss123ss123 

code for the values of a multiselect picklist

I have a multiselect picklist cancellation reason which has some text values stored in it

example:

Incorrect Employer phone number

No longer employed by stated employer

Never employed by stated employer

Couldn't reach employer, multi attempts

Self Employed

 

code for these

EV1

EV2

EV3

EV4

but I need to send out codes for these values to .net listner using outbound messages

it is sending these values above in list

just need to send their code

 

my questions is how can i do with a formula or is there a way to do

like i store codes in picklist however show text on visual force page for those values

 

or how can send code if store text in picklist value

 

Best Answer chosen by Admin (Salesforce Developers) 
Satish_SFDCSatish_SFDC

Create a formula field which stores the codes for the values selected in the multiselect picklist field.

 

IF( INCLUDES( Cancellation_Reason__c , "Incorrect Employer phone number") ,"EV1,",NULL) + 
IF( INCLUDES( Cancellation_Reason__c , "No longer employed by stated employer") ,"EV2,",NULL) + 
IF( INCLUDES( Cancellation_Reason__c , "Never employed by stated employer") ,"EV3,",NULL) + 
IF( INCLUDES( Cancellation_Reason__c , "Couldn't reach employer, multi attempts") ,"EV4,",NULL) + 
IF( INCLUDES( Cancellation_Reason__c , "Self Employed") ,"EV5",NULL)

In the outbound message instead of sending the picklist values , select the formula field which you have just created.

This will send only the codes.

 

In the listener you could then parse the data and process it.

 

Regards,

Satish Kumar

All Answers

Satish_SFDCSatish_SFDC

Create a formula field which stores the codes for the values selected in the multiselect picklist field.

 

IF( INCLUDES( Cancellation_Reason__c , "Incorrect Employer phone number") ,"EV1,",NULL) + 
IF( INCLUDES( Cancellation_Reason__c , "No longer employed by stated employer") ,"EV2,",NULL) + 
IF( INCLUDES( Cancellation_Reason__c , "Never employed by stated employer") ,"EV3,",NULL) + 
IF( INCLUDES( Cancellation_Reason__c , "Couldn't reach employer, multi attempts") ,"EV4,",NULL) + 
IF( INCLUDES( Cancellation_Reason__c , "Self Employed") ,"EV5",NULL)

In the outbound message instead of sending the picklist values , select the formula field which you have just created.

This will send only the codes.

 

In the listener you could then parse the data and process it.

 

Regards,

Satish Kumar

This was selected as the best answer
ss123ss123
same thing just single select picklist how wouls i get this done
If(ISPICKVAL(Hold_Type__c, "IDV","Identity Verification"),Null,
ISPICKVAL(Hold_Type__c, "SSC","Social Security Verification"),null,
If ISPICKVAL(Hold_Type__c, "BOV","Bank Ownership Verification"),
If ISPICKVAL(Hold_Type__c, "POE","Employment Verification"),
If ISPICKVAL(Hold_Type__c, "POI","Income Verification"),
If ISPICKVAL(Hold_Type__c, "UB","Utility Bill - Address Verification"),
If ISPICKVAL(Hold_Type__c, "MIL","Military Verification"),
If ISPICKVAL(Hold_Type__c, "PV","Phone Verification"),
If ISPICKVAL(Hold_Type__c, "FS","Fraud Screen"),
If ISPICKVAL(Hold_Type__c, "VS","Victim Statement"),
If ISPICKVAL(Hold_Type__c, "VS","Military Verification"),
If ISPICKVAL(Hold_Type__c, "SA","Security Alert"),
If ISPICKVAL(Hold_Type__c, "ADDRESS","Address Verification"))
Tried this didn't get what i wanted