
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2024 08:15 PM
Hi,
I have the below BR that aggregates a sum of the field and sets it in another field. However, it doesn't update the latest value but the last entered value to aggregate/sum the value and set it in this new field.
For the first 'if' condition I am just setting the value entered in one field to another using GlideAggregate and I can do it directly too (see the commented line)
However when I am aggregating the else if part of the code the result is not accurate. What I am missing?
I believe, as the latest value is not updated/saved in the database the aggregate gets me the value that is already saved. What can I do in this scenario?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2024 10:20 PM
Hi @Imran1
it's not really clear what you want to achieve, however, please be aware of the nature of "before" Business Rules. They are executed before anything is written to the database, and thus your GlideAggregate might not determine the correct values.
A solution might be using a "after" BR in combination with a current.setWorkflow(false); to prevent another round on server-side.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2024 10:20 PM
Hi @Imran1
it's not really clear what you want to achieve, however, please be aware of the nature of "before" Business Rules. They are executed before anything is written to the database, and thus your GlideAggregate might not determine the correct values.
A solution might be using a "after" BR in combination with a current.setWorkflow(false); to prevent another round on server-side.