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:
- Ensure that the static "APPROVED" value gets the information from an existing field in Creator named "QUALIFICATION_STATUS" from the "NEW_QUALIFICATION" form.
- 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
- void Push_Status()
- {
- mainUpdate = Map();
- customfields = List();
- //Create list for custom Fields
- customfield = Map();
- // Map of custom fields values
- customfield.put("api_name,"cf_test");
- customfield.put("text", "APPROVED");
- customfields.add(customfield);
- mainUpdate.put("custom_fields",customfields);
- response = zoho.books.updateRecord("contacts","00000000","336740000000044104",customfield,"booksconnection");
- info response;