Getting double comments when we use before update BR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2024 10:55 AM
I have a choice field called HITRUST , written a BR when its changes to any value i need to populate previous valued i the automated comments in that same table.
But here I am facing a challenge when i use before update BR with out currnnt.update() getting two automated comments(duplicate).
i use after update BR with currnnt.update() getting only one automated comments.
Any suggestions pls, to get only one automated comments.
Thanks in advance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2024 11:00 AM - edited 08-07-2024 11:03 AM
Hello,
You wouldn't use current.update() in your business rule at all.
You can access the previous value using previous and current value (what has been submitted and sent to the server to be saved) as current.
You would simply set the field to the value you need and that's it. In a before BR, it will automatically save it after it's done processing without needing current.update().
As far as two comments occurring, your current script doesn't show where you aren't using current.update() and you didn't show any proof that there's two showing on the record. Lastly, you could have multiple BRs setup that are triggering, so check that.
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2024 11:15 AM
@Allen Andreas when I use before update BR without current.update, I am getting duplicate automated comments, is there any way to avoid them duplicate comments, I don't want to use current.update in BR.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2024 11:38 AM
@subbarayudu Could you please check if there are multiple before business rule triggering on the same table and if any of those BRs changing value of u_hitrust_type field.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2024 11:05 AM
Hi @subbarayudu
As mentioned, the basic setup you have should only be resulting in one comment. Please read my reply above thoroughly and see if there are multiple BRs, etc. that could be causing this.
For some reason, people are replying echoing the same thing I've already said.
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!