Skip to main content
Ashley Hathaway (MuleSoft, Salesforce) ๋‹˜์ด * MuleSoft Composer *์— ๊ธ€์„ ์˜ฌ๋ ธ์Šต๋‹ˆ๋‹ค

๐Ÿ•ต๏ธ Tips and Tricks from the Composer Team ๐Ÿ•ต๏ธโ€โ™‚๏ธ

 

We're going to be starting a weekly series of tips about Composer designed to teach about some of the nuances and intricacies of the product ... or sometimes just best practices!   

Tip 1: So where did the fields from my get records step go?

If youโ€™ve asked yourself โ€œI tried to use a get records action but Iโ€™m not seeing my dataโ€ then this is the tip for you!  

 

The short answer is: Add a For Each loop after your Get Records step!   

The longer background: The Get Records action (for Salesforce, NetSuite, etc) always returns a list. In some cases, you may be looking to retrieve a single record. For example, fetch the account whose ID = accountID. You know that there will be only one record returned, however, the step will still return this as a list of one record.   In order to use fields from that single record, you will need to loop over the list using a For Each loop. The fields from that record will not appear unless you are within the loop. 

So whatโ€™s next?: Yes, admittedly this is quite annoying and we have an item on our mid-term roadmap to update this behavior.

 

๐Ÿ•ต๏ธ Tips and Tricks from the Composer Team ๐Ÿ•ต๏ธโ€โ™‚๏ธ We're going to be starting a weekly series of tips about Composer designed to teach about some of the nuances and intricacies of the product ...

0/9000