Beam Help — independent expert support for Zoho. This article shows a practical path to send a Deal for approval, create the approval record, and link it back to the Deal using client scripts, a widget, a function and a connection in Zoho CRM; this is not official Zoho support[5].
Why this matters
Approvals are often required when a discount or other sensitive field exceeds a policy threshold; automating the flow prevents unauthorized changes and keeps an auditable record[5]. Beam Help recommends creating an Approvals module and a lookup on Deals so the approval record can be attached to the Deal for tracking[5]. Implementing the flow with client scripts, a widget, a function and a connection lets you show instant field errors, collect approver/reason input, create the approval record, and reset the field value as needed[5].
Step-by-step
- Step 1. Create the Approvals custom module in Zoho CRM and add a lookup field named Discount_Approval on the Deals module so approval records can be linked to Deals[5].
- Step 2. Add any fields the approval record needs (approver, reason, status) in the Approvals module so the Function can save them when triggered[5].
- Step 3. Build a Client Script (Field Event) on the Deals module to show an inline error next to the Discount field when its value exceeds your policy limit (for example, 20%) so users get immediate feedback before saving[5].
- Step 4. Implement a Client Script (Save Event) on Deals that, when Save is clicked after the error, opens a Widget to let the rep choose an approver and enter the reason, and then prevents or alters the save as your process requires[5].
- Step 5. Create the Widget that presents an active-CRM-users approver dropdown and a Reason text area so the rep can supply approval details when prompted by the Client Script[5].
- Step 6. Add a Function that will be called from the Widget or Save event; the Function should create a new record in the Approvals module and return its ID so you can link it back to the Deal[5].
- Step 7. Use a Connection to grant secure access for the Function to create records in Zoho CRM from server-side code so the Function can insert the approval record into the Approvals module[5].
- Step 8. From the Client Script or Function, set the Deal’s Discount field to the allowed maximum (for example, 20%), save the Approval record ID into the Deal’s Discount_Approval lookup, and show a confirmation message like "Sent for approval" to the rep[5].
- Step 9. Test the full flow: enter an excessive discount, confirm the Field Event error appears, open the Widget on save, create the approval record via the Function, and verify the Discount_Approval lookup on the Deal contains the new approval record ID[5].
Common pitfalls
- You must create the Approvals module and the Discount_Approval lookup field before wiring scripts and functions; missing these prerequisites will break the linking step[5].
- The implementation assumes specific field API names; if your fields use different API names you will need to update the scripts, widget, and function to reference the actual names in your org[5].
What to check
- The Approvals module exists and the Deals module has a Discount_Approval lookup field pointing to it[5].
- The Client Script (Field Event) shows an inline error when Discount exceeds the threshold and the Save Event opens the Widget as expected[5].
- The Function creates an Approvals record, the Deal’s Discount is reset to the allowed value, and the Discount_Approval lookup on the Deal points to the new approval record[5].