TRUE/FALSE field is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2021 01:14 AM
Hi Team,
I have a true/false field(made_sla), this field need to populate as true or false based on two date&time fields(X&Y).
if(X>Y) then made_sla=TRUE
else if(X<Y) then made_sla=FALSE.
logic is working and logs also printing, but made_sla is always showing as "FALSE" we do not have default value defined for this field.
if (widnowstart > breachtime) {
current.made_sla = 'true';
//gs.addInfoMessage("made:" + current.made_sla);
} else if (widnowstart < breachtime) {
current.made_sla = 'false';
}
Addinfo mesages are coming correctly but field is not updating, i have tried business rule on Before and after.
What might be the reason why Made_sla not accepting TRUE value? can anyone help me what are the backend logic stoping except dictionary default value.
Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2021 01:19 AM
Hi aahitha,
If made_sla is a boolean then remove the quotation marks when setting the values.
Like this:
if (widnowstart > breachtime) {
current.made_sla = true;
//gs.addInfoMessage("made:" + current.made_sla);
} else if (widnowstart < breachtime) {
current.made_sla = false;
}
Kind Regards,
/Erik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2021 01:38 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2021 01:45 AM
ok, its hard tell without the full details but if the BR is After then you will also need to run current.update() after setting the values in order to save again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2021 01:47 AM
I have tried After Business rule with current.update(), still same issue.