[Zoho CRM] How to create a function for mass action button?

[Zoho CRM] How to create a function for mass action button?

In the function you are about to write, you can edit the Arguments. Let's say for example we're dealing with the Deals module, then what you want to do is add an argument mapping to the Deal ID field. I would suggest putting the mapping value as a plural (i.e: DealIDs) because we will be dealing with multiple records most of the time.
 
Now, what would happen when the button is clicked when multiple records are chosen is, it would return the IDs of the Deals record like this:
 
1243331222221004|||1243331222221005|||1243331222221006
 
This is a string value. We have to convert this string into a list and that's simple. Simply write this line:
This will change the string value to a list. And why do I do the conditional thing is because there is a possibility that only one record is chosen and in that case, there will be no "|||" in the returned value.
 
Then, simply do the "for each" thing, for example;

And it should work just fine. Hope this helps.