For each element, what is the good syntax?

For each element, what is the good syntax?

Hello, I'm trying to use the for each element in Deluge in a custom function in Zoho CRM but I get error message no matter how I write the code.

If I write like this:

  1. 20 for each x in notesinfo {
    21 x.Parent_Id.id = contact_id;
    22 x.$se_module = "SubContacts";
    23    }

I get this : "Improper Statement Error might be due to missing ';' at end of the line or incomplete expression Line Number:20"

If I write like this: 
  1. 20 for each x in notesinfo {
  2. 21 x.Parent_Id.id = contact_id;
  3. 22 x.$se_module = "SubContacts";
  4. 23    } ;
I get this : Syntax error. Expecting '}' or statement. Found ';'. Line Number:23

Thanks in advance for your help
    Zoho Marketing Automation

          • 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 Pagesense Resources

            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