Update lookup field

Update lookup field

Hi 

I have this function that needs to update the account based on what happens in a custommodule

account = zoho.crm._getRecordById("Accounts",account_id);
trial = zoho.crm._getRecordById("CustomModule2",trial_id);
trialLookup = trial.get("Name");

StartNote = trial.get("Start trial note");
MidNote = trial.get("Mid trial note");
EndNote = trial.get("End trial note");

account.put("Start trial note",StartNote);
account.put("Mid trial note",MidNote);
account.put("End trial note",EndNote);
account.put("Trial",trialLookup);

crmResp = zoho.crm._updateRecord("Accounts",account_id.toString(),account);

It can update the first 3 fields but only updates the account.put("Trial",trialLookup) if the field is empty. The field I am trying to update is a lookup field. Is there anyway to force the update or empty the field before updating it again?

Thanks

    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
                                          • Sticky Posts

                                          • Enrich your CRM data and keep them updated

                                            You spend a lot of your time and efforts in generating quality leads for your business. While generating leads is a challenge in itself, the real deal begins when sales reps try to nurture these leads and convert them as customers. So how equipped is your sales team with information about your leads matters a lot.  For example, you might be using webforms to generate leads and collect customer information from your website. The lesser your webform fields are, the more your sign-ups right? From optimizing
                                          • New capabilities for custom buttons: Elevate UX and CX with just a click!

                                            Dear Customers, We hope you're well! We're happy to announce enhancements we've made to buttons. Buttons in Zoho CRM are a simple yet versatile customization tool. It offers great usability for CRM users, enabling them execute important actions as required.
                                          • Introducing Zia Presentation in Zoho CRM

                                            ----------------Moderation 3.0, Date: 10th May'24--------------------------------------- Zia's Presentation feature is now available for orgs in US, EU, IN, CN, JP, and AU DCs. Orgs., with Enterprise or Ultimate editions with 20+ user licenses can access
                                          • Zoho CRM Digest - February 2024

                                            We're thrilled to bring you the February digest, packed with exciting product updates and engaging discussions from the Zoho CRM Community. Keep reading to stay in the loop! Product Updates: Zia Enhancements Be it Tasks, Calls, or Meetings, Zia's activity
                                          • Canvas templates can now be shared with different CRM organizations

                                            ----------------------------------------Moderated on 14th February, 2023------------------------------------------- Dear all, This feature is now open for all users in all DCs. To learn more about importing and exporting canvas templates, read our help


                                          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 WorkDrive Resources



                                                                    Zoho Campaigns Resources

                                                                      Zoho CRM Resources

                                                                      • CRM Community Learning Series

                                                                        CRM Community Learning Series


                                                                      • Tips

                                                                        Tips

                                                                      • 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