OOTB attachment sync is enable in CA Service Desk to copy the attachment from CA Service Desk to CA Service Catalog.As well as we have custom process to copy the attachment from CA Service Catalog to CA Service Desk.
Now when we are attaching something in Catalog it will sync properly in CA SDM but since OOTB attachment sync is enable in CA SDM it will again re-attaching to Catalog.
My query is, is there any way to restrict the sync attachment from SDM to Catalog if attachment is coming from Catalog?
I am not sure off hand that this can be done from the SDM side because the trigger is not user-editable and will not be able to differentiate whether the attachment came in from catalog or not. There may be something on the catalog side to check if that same attachment already exists, and if so, ignore it?? Not sure.
Anyone else have any ideas here for Pankaj?
The trigger is editable. We rebuilt it to use a custom field because we didn’t like that it used external_system_ticket.
To modify the script/trigger copy the itsm.spl and itsm.maj from bopcfg/magic to site/mods/magic
Service desk manager uses the scripts in itsm.spl and maj files to control what is input into the usp_itsm_msg_queue table. The Catalog sync daemon will pickup new entries in that table and try to push them to the related service catalog request.
The itsm.spl scripts look for the text “CASC-” at the beginning of the activity description. If that string is found the activity will not be sent back to service Catalog.
Which means you can prefix your activity log description with CASC- to stop it from synchronizing back to service catalog.
Thanks for the reply.
In my case 'Catlog attachment' is the prefix, so if I change CASC to 'Catlog attachment' in itsm.spl then it should work.
@Pankaj007 - let us know if Grant's info helped you out here.
That's right, copy itsm.spl and itsm.maj from nx_root/bopcfg/magic to nx_root/site/mods/magic. Then open the version in nx_root/site/mods/magic with an editor.
Find line 257, which is part of the lrel_attachments_requests function for synchronizing sdm attachments to service catalog. It should look like this.
// Check if attachment file name starts with 'CASC', If yes, implies that the attachment is comming from Catalog, no need to Sync it to Catalog, we simply return if(sindex( file_name, "CASC", 0 ) != -1 || is_null(cat_req_id) || is_empty(cat_req_id) || cr_type == 'P')
and update it to this..
// Check if attachment file name starts with 'CASC', If yes, implies that the attachment is comming from Catalog, no need to Sync it to Catalog, we simply return if(sindex( file_name, "Catalog attachment", 0 ) != -1 || is_null(cat_req_id) || is_empty(cat_req_id) || cr_type == 'P')
If you need Change Order attachments to synchronize back to Service Catalog you can also update the lrel_attachments_changes function at line 371.
Once you've made your chances recycle service desk and test.
I think you may also need to change file_name to attmnt_desc.