Synchronize catalog task activity and requested item activity

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2016 03:05 AM
Hi, how do we synchronize the catalog task activity and requested item activity.
I have successfully synchronize them both using BR for catalog task and BR for Requested Item.
The when to run of my BR's are:
When: before
Update
The problem is, the activity in the catalog task are duplicated.
See the screenshots below:
I know that the one causing the duplication is because of the 2 Business rule running. In which the Requested Item BR will be triggered
when the Catalog Task added a work notes.
I also tried adding
if(!current.work_notes.getJournalEntry(-1).split("\n\n")[0].indexOf('Work notes')){
gr.comments = comments;
gr.update();
}
It stops the duplication of the catalog task activity.
But the comments from requested item to catalog task. doesn't work anymore.
Thanks,
Tadz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2016 03:51 AM
Hi,
Here is the catch which i can think on top of my head. I believe the Business rule is been called more than one time from Request level causing multiple updates.
I believe that you are trying to update the Sc_task from sc_req_item on every update when the comment is updated.
You can add a new condition on this BR as current.comments.changes() which will ensure that the BR runs only on comment change and then you can straight away update the respective sc_task within it.
Not sure i exactly understood your logic.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2016 06:01 AM
Hi K10,
Thanks for the way. But still doesn't work.
Here is my code:
if(current.comments.changes()){
gr.comments = comments;
gr.update();
}
Thanks,
Tadz

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2016 06:07 AM
Is there a way to disable the requested item BR if the catalog task BR is executed?
Thanks,
Tadz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2017 04:21 PM
Ever figure this one out?