Make certain subform entries read only

Make certain subform entries read only

Hi all

I need to make specific entries on a subform to be read only for portal users.

Ive added a field to my subform called 'read only' which is a picklist with the values of Yes and No. Ive set this field to be hidden as its only to be used in the function which make that specific entry to be read only. (I presume this is whats needed).

The function should fire when a new record is created in the parent module.

What would be the deluge script for this function please?

My current code is:

  1. recordDetails = zoho.crm.getRecordById("My_Module", My_Module_ID);
  2. subformEntries = recordDetails.get("My_Subform");
  3. for each  entry in subformEntries
  4. {
  5. rowMakeReadOnly = entry.get("Make read only");
  6. if(rowMakeReadOnly == "Yes")
  7. {
  8. // make this row of fields read only
  9. }
  10. }

Thanks







    Access your files securely from anywhere

        Zoho Developer Community




                                  Zoho Desk Resources

                                  • Desk Community Learning Series


                                  • Digest


                                  • Functions


                                  • Meetups


                                  • Kbase


                                  • Resources


                                  • Glossary


                                  • Desk Marketplace


                                  • MVP Corner


                                  • Word of the Day



                                      Zoho Marketing Automation


                                              Manage your brands on social media



                                                    Zoho TeamInbox Resources

                                                      Zoho DataPrep Resources



                                                        Zoho CRM Plus Resources

                                                          Zoho Books Resources


                                                            Zoho Subscriptions Resources

                                                              Zoho Projects Resources


                                                                Zoho Sprints Resources


                                                                  Qntrl Resources


                                                                    Zoho Creator Resources



                                                                        Zoho Campaigns Resources


                                                                          Zoho CRM Resources

                                                                          • CRM Community Learning Series

                                                                            CRM Community Learning Series


                                                                          • Kaizen

                                                                            Kaizen

                                                                          • Functions

                                                                            Functions

                                                                          • Meetups

                                                                            Meetups

                                                                          • Kbase

                                                                            Kbase

                                                                          • Resources

                                                                            Resources

                                                                          • Digest

                                                                            Digest

                                                                          • CRM Marketplace

                                                                            CRM Marketplace

                                                                          • MVP Corner

                                                                            MVP Corner





                                                                              Design. Discuss. Deliver.

                                                                              Create visually engaging stories with Zoho Show.

                                                                              Get Started Now