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

Record type



I created one custom object Booking and in this i created one custom field name which is a multi picklist.Cars is one more custom object.If i select the multi picklist in Booking it has to create the record type in cars.


Example :This is the multi picklist value



According to above example i need to create the record type in Cars depending on only considering Maruthi or Alto.

For this i need to check before hyphen and then depending on Maruthi or Alto i hv to create record type.

How can this be done using apex code.Please help me in this.i have confusion regrading how to check value before hyphen.


If I select both value then it is seperated by semicolon like


For this one i need to ckeck both i.e whether it is Maruthi or Alto and whether it is Old or New.

How can this be done using apex code except hard coding.If i hard code then the length of the programme is long.Please help me in this.


you posted the same question somehwere else.. but, net , you use the string split(delimiter, data) fuction to get a list of parts before and after the delimiter