client script: clone record: on load. How do you get the parent record id?

client script: clone record: on load. How do you get the parent record id?

I have a custom module.  I have a lookup field back to itself.  the purpose of this lookup field is to link it to a parent record.

I want to clone a record and have the clone wizard pop up.  I'm trying to auto fill this lookup field back to the parent record.

I thought I could do this using a client-script, but i can't figure out how to get the record if of the parent record.  The information is there in the URL bar when you click on clone, so i figured i could grab it via a ZDK.Page.getField() call, but the Id isn't there.

 I believe with a function instead of an API call, I could create a custom clone button on the view page, but it would save the record, then i would have to open it, and not give me the option of the wizzard to edit everything before saving it.

I now i could create a custom button on the create/clone page, but i don't understand if that would allow me to do what I want or not and i haven't tried it yet.

    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

                                          • Call Bar feature is now available in Zoho CRM

                                            Dear All,   We are here with an enhancement for our built-in telephony users. Upon setting up the built-in telephony, users get the Phone settings at the bottom of the screen — it helps them to set their availability status (online or offline), customize
                                          • Introducing multiple location URLs and date picker in Webforms

                                            Hello everyone,  Webforms simplify the process of gathering prospect information by hosting forms on the website. The interested visitors fill the details and submit the form that lands into the CRM system giving the company an interested lead to follow-up
                                          • 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
                                          • Introducing Color Coding of Picklist Values

                                            Dear Everyone, Greetings!! Zoho CRM is uplifting the user experience. Recently, we had some notable aesthetic improvements in CRM like Kanban View UI enhancement, New List view UI enhancement, color coding of tags, and color coding of picklists in meetings.
                                          • New capabilities for custom buttons: Elevate UX and CX with just a click!

                                            -------------------------------------------------Post moderated on 24th May-------------------------------------------------------------- Dear all, The feature is now available for all users in all DCs. Dear Customers, We hope you're well! We're happy


                                          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