How to auto populate fields based on CRM Integration lookup

How to auto populate fields based on CRM Integration lookup

Hello, 

I have scoured the forms and tried multiple solutions but I can't seem to figure this very simple task. I am a beginner and am just learning Deluge so any help would be much appreciated. 

I have a form (Add_Warehouse) with an Integration field set to the Deals module in my Zoho CRM account. I would like to auto populate the following fields, from the Deals module, based on the users response to the field 'Import Details from CRM field' (Creator field link name: CRM_import). The module is listed as 'Potentials' for this field.

- Account Name from CRM (Creator field link name: Company_Name)
- Quote Number from CRM (Quotation_Number)
- Contact Name from CRM (Contact_Name)
-Contact Email from CRM (Contact_Email)
-Contact Phone from CRM (Contact_Phone)
-Description from CRM (Description)

I understand that there have been many answered questions with regards to this task, but I cannot seem to figure it out. If it's not obvious already, I will include some of my code below which will surely indicate that I am a beginner :)

  1. 'crmresp = zoho.crm.getRecordById("Deals", input.CRM_import);
  2. Company_Name=crmresp.get("Account_Name");
^^ continued for all fields

Some answers say to use getrecordsbyID, while others say to use getrelatedrecords, which one is correct and how would it look?

    Access your files securely from anywhere







                            Zoho Developer Community





                                                  Use cases

                                                  Make the most of Zoho Desk with the use cases.

                                                   
                                                    

                                                  eBooks

                                                  Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho Desk.

                                                   
                                                    

                                                  Videos

                                                  Watch comprehensive videos on features and other important topics that will help you master Zoho Desk.

                                                   
                                                    

                                                  Webinar

                                                  Sign up for our webinars and learn the Zoho Desk basics, from customization to automation and more

                                                   
                                                    
                                                  • Desk Community Learning Series


                                                  • Meetups


                                                  • Ask the Experts


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner






                                                            Manage your brands on social media



                                                                  Zoho TeamInbox Resources



                                                                      Zoho CRM Plus Resources

                                                                        Zoho Books Resources


                                                                          Zoho Subscriptions Resources

                                                                            Zoho Projects Resources


                                                                              Zoho Sprints Resources


                                                                                Qntrl Resources


                                                                                  Zoho Creator 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


                                                                                            Zoho Show Resources


                                                                                              Zoho Writer Writer

                                                                                              Get Started. Write Away!

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

                                                                                                Zoho CRM コンテンツ








                                                                                                  Nederlandse Hulpbronnen


                                                                                                      ご検討中の方