Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save AshikaSuresh/8a0b4e33762cb92d904a8784ff45630c to your computer and use it in GitHub Desktop.

Select an option

Save AshikaSuresh/8a0b4e33762cb92d904a8784ff45630c to your computer and use it in GitHub Desktop.
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()
//Subform - Campaign Details - onRowAdd
ZDK.Page.getSubform('Campaign_Details').getRow(index).getCell('Status').setValue('Planning');
//updating base allocated budget on row addition
ZDK.Page.getSubform('Campaign_Details').getRow(index).getCell('Allocated_Budget').setValue('3000');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment