Extract IDs from Response from getRelatedRecords and return as string to map to Multiline Text Field

Extract IDs from Response from getRelatedRecords and return as string to map to Multiline Text Field

Hey All,

SITUATION: I have a Custom Module named 'RUNS' that has a multi-lookup field for 'Deals'. When the related deals are changed, or updated, I need to have the updated Related Deals listed out into a multiline text field - either by name or by ID (ID preferred).

I CREATED A WORKFLOW WHERE:
Any time a run's related deals are edited at all it will run a custom fuction.

MY CUSTOM FUNCTION:

relRecords = zoho.crm.getRelatedRecords("Deals114","RUNS",RUNSId.toLong(),1,200);
info tostring(relRecords);
mp = Map();
mp.put("All_Related_Deals",relRecords);
update = zoho.crm.updateRecord("RUNS",RUNSId.toLong(),mp);
info mp;
info update;

Deals114 is my correct Related List API name for the Deal (went through that whole rigmarole) - The response does come through though when I test it, I can see the two related deals and their IDs in a bunch of relevant text relevant to the related deal, but it doesnt actually bring anything into the text field, and also - I do not know how to extract only the IDs and convert them to a list, in string format, for the All_Related_Deals Multiline Text Field.

I am hoping for the response to look something like this:

911000011068685,911000011068686,911000011068687


Can anyone help me?