Hi.
I had activate the Sales Order module in Customer Portal.
By default the "account_name" field cannot be display from customer portal preview.
However, internally we need the "account_name" for every Sales Order created by customer through the portal
So I had tried to write a function to make it work, but it seem failed.
Let me briefly explain
In the Sales Order module , with three fields that related to function
a) Contact name field (by default, mandatory in portal)
b) Account Name field (by default, not display in portal)
c) Email field (customized email field, read only for customer)
Current result when creating Sales Order from portal:
a) User create a records from portal (By default, Contact name will showed in the field)
b) Sales Order is created, but without the Account name and email address value
The expected function when creating Sales Order from portal:
a) User create a records from portal (By default, Contact name will showed in the field)
b) Once records created , the company and email field need to auto populate the value based on the contact name
Below is the custom function that tested which run in a workflow, but it failed, can anyone help ?
Please refer attachments for details
--------------------------------------------------------------------------------------------------------------------------------
SOInfo = zoho.crm.getRecordById("Sales_Orders",SO_Number);
ContactID = SOInfo.get("Contact_Name");
ContactInfo = zoho.crm.getRecords("Contacts");
Account_Name = ContactInfo.get("Account_Name");
info Account_Name;
Email = ContactInfo.get("Email");
info Email;
mp = Map();
mp.put("Account_Name",Account_Name);
mp.put("Email",Email);
update = zoho.crm.updateRecord("Sales_Orders",SO_Number,mp);
info update;
--------------------------------------------------------------------------------------------------------------------------------
Thank you