How to get Service Request Contains Attachments
1. Create one new field to display Attachment Count in Service Request Application.Attachment Count(Attribute Name-XYZ)
2. Create Automation Script to get count and Display in Attachment Count Field.
3. Go To->System Configuration->Platform Configuration->Automation Scripts
4. Create Object Launch Point with below details
Script Name: Test
Script Description: Test
Script Language: Jython
Object : SR
Events-select Save radio button,on Save Event select 3 checkboxes(add,update,delete) and selectBefore Save Radio button.
5.Click Next and provide launch point details as mentioned below
Launchpoint Name: Test
Description: Test
6. Click Next and Copy the code ,Click On create.
from psdi.mbo import MboSet
from psdi.mbo import MboConstants
from psdi.mbo import Mbo
ticid=mbo.getString("TICKETUID")
orgcls=mbo.getString("CLASS")
docquery="ownerid='"+ticid+"'"+ "AND OWNERTABLE='"+orgcls+"'"
docMboSet=mbo.getMboSet("$$DOCLINKS","DOCLINKS",docquery)
count=docMboSet.count()
count1=str(count)
mbo.setValue("XYZ",count1)
No comments:
Post a Comment