Accessing Custom Fields within Deluge Custom Button Script

Accessing Custom Fields within Deluge Custom Button Script

Hello, 

I am just getting started in customizing the Zoho Inventory App by adding custom buttons. I am trying to access custom fields that have been setup on the Purchase Order module with the following script: 

//This is a sample function. It will display the reference number
referenceNumber = purchaseorder.get("reference_number");
lotQty = purchaseorder.get("cf_number_of_lots");
resultMap = Map();
resultMap.put("message","Reference number -" + referenceNumber + ", Number Of Lots - " + lotQty);
resultMap.put("code",0);
// 0 - Success ; Other than 0 will consider as failure
return resultMap;

No matter what happens, the lotQty variable always comes back with Null. I've checked and the cf_number_of_lots is the API name of the custom field. 

Any help will be greatly appreciated. 

Jim      
    Zoho Desk Resources

    • Desk Community Learning Series


    • Digest


    • Functions


    • Meetups


    • Kbase


    • Resources


    • Glossary


    • Desk Marketplace


    • MVP Corner


    • Word of the Day


      Zoho CRM Plus Resources

        Zoho Books Resources


          Zoho Subscriptions Resources

            Zoho Projects Resources


              Zoho Sprints Resources


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




                          Zoho Writer Writer

                          Get Started. Write Away!

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

                            Zoho CRM コンテンツ




                              ご検討中の方