Query on Business rule wrt Assignemnt group and Assigned to fields?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2024 08:20 AM
In user table I have an user called'UserA'
In group table I have a group called 'GroupA'
In my business rule, i have written below 2 lines of code..
current.assigned_to = "UserA"; -----> THIS WORKS
current.assignment_group = "GroupA"; ------> This DOES not work... WHY? (if I pass the sys_id, only then it works).
Why? both are reference fields. Then why the difference?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2024 08:49 AM
Hi @Suggy
Need to look at the configuration of the tables and others, but SN best practice says always use the sys_id while working with the reference fields as the name can be changed.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2024 08:53 AM
Yes @_Gaurav I know that its best practice to use sys_id, but still wanted to know the reason for above behaviour 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2024 08:04 AM - edited 02-07-2024 08:05 AM
hi @Suggy , maybe it can be something with the fields attributes. Could you check if both have the same value?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2024 11:56 PM
Hello @Hugo Barros I already checked it, that did not make any difference.