• CRM Science

Challenge 7: Merge Text

Salesforce Devs, we have a Lab Coat Challenge for you that will test your mental ability. Review the challenge, take a look at the starter code, and then give it your best attempt. If you come up with the right answer, you will earn a Lab Coat Badge. We'll share your success on Twitter!


Today’s challenge has to do with merging text.


Hi {!FirstName},

We hope you enjoy {!Number__c}. Show us your {!ChallengeSkillset__c} chops!

Hang on..., that’s not a typo or a merge fail.

It’s the gist of this Lab Coat Challenge. You’re developing a way to construct a dynamic query that includes all of the placeholders in a given piece of text. Your objective is to take in a string of text, with one or more merge fields, pluck out the fields, and build your query string out.

For example, for the above sample, your query string would need to pull in the FirstName field (IE: SELECT Id, FirstName, ChallengeNumber__c, ChallengeSkillset__c…).

Starter Code

You must use the following code and can only add to the code provided below.

Submit Your Answers Here

Recent Posts

At CRM Science, we use our Salesforce expertise to transform your enterprise. Partnering with our clients throughout the Salesforce journey, we work with leaders to strategize and optimize business processes, and design and develop solutions across every Salesforce cloud. We help you maximize the value of the Salesforce platform. 

CRM Science is a Salesforce Gold Consulting Partner and a Salesforce.org Impact Partner. Our strategic consulting services were recognized by Salesforce in four consecutive Salesforce Partner Innovation Awards, an annual recognition for partners that deliver outstanding client success. 

Connect with us
Email Us
860 First Ave, Suite 2
King of Prussia, PA 19406
(484) 775-0333
  • Twitter
  • Facebook
  • YouTube

Copyright © 2011-2021 CRM Science, Inc. All rights reserved.