Problem at the time of copying data from Parent Module to chiled one

Problem at the time of copying data from Parent Module to chiled one

Hello I have customized the default function "Mass update of Child Contacts" to copy some fields from Parent Module Leads to child Module Message. We have an structure where one Lead (Email, type) may have many messages, one per (email,Type) combination is contacting us.

I am trying to move some details from Lead to the message, so we can generate some automation based on those fields. 

But I am getting below error:

'TEXT' can not be cast to '[BIGINT]' for the function 'get'at lineNumber 14

The code is:

voidMass_update_of_Child_Messages(Int accId)
{
rec = zoho.crm.getRecordById("Leads",accId);
resp = zoho.crm.getRelatedRecords("Messages","Leads",accId,1);
for each  ele in resp
{
mp = Map();
mp.put("Region",ifnull(rec.get("Region"),""));
mp.put("Email",ifnull(rec.get("Email"),""));
mp.put("Status",ifnull(rec.get("Status"),""));
mp.put("Lead Owner",ifnull(rec.get("Message Owner"),""));
mp.put("Source System",ifnull(rec.get("Source System"),""));
mp.put("Sales Manager",ifnull(rec.get("Sales Manger"),""));
updateResp = zoho.crm.updateRecord("Messages",ele.get("CustomModule5 Id"),mp);
info updateResp;
}
}


Sorry, maybe it is a simple issue but I am not a developer and not capable to short it out.

Thank you very much for your help
Regards


    • Sticky Posts

    • Function #41: Sync Associated Subforms!

      Welcome back everyone! The last custom function showed how to update a Contact with Product details from it's Related list in Deals. This week, let's look at a function that lets you update subform records in two modules simultaneously when one of them is updated. Business scenario Let's look at how subform helps in an education institution that has deployed Zoho CRM. National Public School, Austin (made up, of course!) has set up Zoho CRM and it follows the same relationship pattern of "Students",

      Zoho SalesIQ Resources



            Zoho TeamInbox Resources

              Zoho DataPrep Resources


                  Zoho CRM Plus Resources

                    Zoho Books Resources


                      Zoho Subscriptions Resources

                        Zoho Desk Resources

                          Zoho Projects Resources


                            Zoho Sprints Resources


                              Qntrl Resources


                                Zoho Creator Resources


                                  Zoho WorkDrive Resources




                                      Zoho Campaigns Resources

                                        Zoho CRM Resources

                                                    Design. Discuss. Deliver.

                                                    Create visually engaging stories with Zoho Show.

                                                    Get Started Now


                                                      Zoho Show Resources


                                                        Zoho Writer Writer

                                                        Get Started. Write Away!

                                                        Writer is a powerful online word processor, designed for collaborative work.

                                                                  有料プランをご利用の方