Creator information to Books custom field

Creator information to Books custom field

Hello community, 

I've two surely basic questions for people with more expertise than me, but it's been two days checking forum posts to get a solution without success. 

Context
In our business, we need to qualify/approve all our suppliers before allowing purchases. We use Zoho Inventory for managing the purchasing and vendor information. Next to this, I've build an Vendor Qualification application in Creator which is working fine. I'm fetching already through Deluge supplier information from Inventory to Creator (Supplier ID, Supplier Name,...). In order to close the loop, I would like to feedback the Approval Status from Creator back to a custom field in Inventory. 

Current code and issues
With below code, I can populate the custom field in Inventory named "cf_test" but with a static value "APPROVED". And it only populates one vendor "336740000000044104" with  the updateRecord function. 

So I would like to achieve two things: 
  1. Ensure that the static "APPROVED" value gets the information from an existing field in Creator named "QUALIFICATION_STATUS" from the "NEW_QUALIFICATION" form. 
  2. Ensure that this process runs generically for all suppliers (on Sucessfull submission of the form) using the "Supplier_ID" instead manually
Would someone guide me on how to achieve this ? 

Thanks, 

Mark
  1. void Push_Status()
  2. {
  3. mainUpdate = Map();
  4. customfields = List();
  5. //Create list for custom Fields
  6. customfield = Map();
  7. // Map of custom fields values
  8. customfield.put("api_name,"cf_test");
  9. customfield.put("text", "APPROVED");
  10. customfields.add(customfield);
  11. mainUpdate.put("custom_fields",customfields);
  12. response = zoho.books.updateRecord("contacts","00000000","336740000000044104",customfield,"booksconnection");
  13. info response;

    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