Skip to content

Instantly share code, notes, and snippets.

View AshikaSuresh's full-sized avatar

AshikaSuresh-ZohoCRM AshikaSuresh

View GitHub Profile
If the Allocated Budget of all campaigns exceeds the Total Budget Allocated, prevent the row from being saved and display an error message.
Prevent row save on criteria mismatch: Use beforeRowUpdate subform event to return false and display an error with showError().
The Allocated Budget field must be editable only by admins, while it remains read-only for all other users. When the Status is set to "Complete," the entire row should become read-only. Additionally, if the Status is anything other than "Planning," the Allocated Budget field should be restricted to read-only at the cell level. The Type of Campaign column should be visible only when the Parent Type field's value is "others." At all other times, the Type of Campaign column should remain hidden.
1. Row lock: Row setReadOnly(true) if Status = Complete
2. Cell lock: Cell setReadOnly(true) if Status != Planning
3. Field lock: Field setReadOnly(true) if Profile is other than Administrator
4. Hide/Show Subform Field : setVisibility(false) if Type == 'Others'
In the Campaign Module's subform, when a new row is added, the "Status" field should auto-populate with "Planning" and the "Allocated Budget" should default to $3000. Changing the Region should clear the campaign details to ensure only region-specific data is displayed.
1. Row Auto-population: onRowAdd Event with setValue()
2. Subform clearing: onChange Event on "Region" field with clear()
At Zylker, the admin felt ensuring data integrity during key Deal stages is crucial. To prevent accidental loss of information, deleting items from the subform is restricted when a deal is in the following stages: Proposal/Price Quote, Negotiation/Review, Closed Won, Closed Lost, or Closed Lost to Competition.
Row Delete Prevention : beforeRowDelete subform Event by returning false after verifying Deal Stage.
Zylker is a manufacturing organisation that uses Zoho CRM. The subform in Quotes module should filter products based on the selected Product Category. In Quotes Module, when the quantity in the Quoted Items subform exceeds available stock, the system must display an error and reset the field to null.
1. Dynamic row value based filter : onLoad Page Event with setCriteria()
2. Error message : onCellChange Event with showError()
3. Clearing cell : onCellChange Event with setValue()
When the user clicks "Add Dental Products" button, a pop-up should appear showing the Dental Instruments available in the Products module and the instrument details selected in this pop-up should get inserted as rows in the subform.
Configuration
Page Details : Create Page (Canvas)- Orders
Event Details : Canvas Button Event - "Add Dental Products" button
Choose_Products widget - https://github.com/AshikaSuresh/Choose_Products.git
When the checkbox "Is shipping address same as billing address?" is checked, the Shipping Address section should not be visible.
Configuration
Page Details : Create Page (Canvas)- Orders
Event Details : Field Event - Is shipping address same as billing address? - onChange
Whenever the user selects the "Product category", then the page should scroll to the respective section in the Create Page(Canvas).
Configuration
Page Details : Create Page (Canvas)- Orders
Event Details : Field Event - Product Category - onChange
Description:
In the Deals Module, after selecting the Account Name, when the Checkbox (Check out the products for this Account) is clicked, the Products from the Related List (RL) of the Associated Account will be retrieved and displayed in a Widget. The user can then choose one or more products and update them in the subform.
Configuration:
Page Details
Category Module
Page Create Page
Module Deals
Layout Standard
Case : Apply 10% discount on each item if total exceeds $500, based on user confirmation.
Configuration:
Page Details : Create Page - Quotes - Standard
Event Details : Page Event - onSave
Demo Video - https://zwdrive.com/d2cLQi