You need to sign in to do that
Don't have an account?

Convert text field object
Good day!
I write a trigger and ran into a problem ((
In the info_c comes this value:
Scott; Kavanagh; The Art Of; Vice President; 416-555-5555; scott@theartof.com | Steve; Comrie; Simplicate Interactive; Owner; 416-555-5555; steve@simplicate.ca | John; Smith; Rogers; Marketing Assistant; 416-555-5555; john.smith @ rogers.com
I need to convert this value and add to object Сontacts:
1st contact:
First Name - Scott
Last Name - Kavanagh
Company - The Art Of
Job Title - Vice President
Phone - 416-555-5555
Email - scott@theartof.com
2nd contact:
First Name - Steve
Last Name - Comrie
Company - Owner
Job Title - Vice President
Phone - 416-555-5555
Email - steve@simplicate.ca
N nd contact:
.......
How do I make it?
If the order stays the same, I would first explode it using your PIPE symbol so you can seperate your Sobjects as such.
All Answers
If the order stays the same, I would first explode it using your PIPE symbol so you can seperate your Sobjects as such.
splitting it by the pipe like that separates it by every single character because it is doing a regex. Just escape it like
and then it's perfect.
Yeah I was just writing out sudo code, didn't really test it. Thanks for looking out.
Thank you so much!