- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi ,
I'm trying to hide the choice value in state field in the approval tabe base on the source table. I used onload client scrit to hide the option but working .
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
@armanoj
Another approach is to use a Display Business Rule to pass the source table value to the client using g_scratchpad, and then reference that value in your Client Script.
(function executeRule(current, previous) {
g_scratchpad.sourceTable = current.getValue('source_table');
})(current, previous);
Client Scripit
var sourceTable = g_scratchpad.sourceTable;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hello @armanoj
Follow it
function onLoad() {
var sourceTable = g_form.getValue('source_table');
if (sourceTable == 'sc_req_item') {
g_form.removeOption('state', 'approved');
// g_form.removeOption('state', 'rejected');
}
}