What's new in Customer Journeys?

Connect and learn more! ×
SetAttribute in Groovy script after calling a REST Api not changing status? — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

SetAttribute in Groovy script after calling a REST Api not changing status?

Question
11
Views
0
Comments

Hello,

We have a script of calling third party web service and after that script we want to update the status of the Service Request, but it's not working with setAttribute function. So here is my code:

def POST_param =

[

 Title : Title,

 Proizvod : "product ACC",

 Details : ProblemDescription,

 CreatedBy : SrCreatedBy,

 Priority : SeverityCd,

 NazivKlijenta : ReportedByPartyName,

 BrojTelefona : PrimaryContactFormattedPhoneNumber,

 EmailAdresa : PrimaryContactEmailAddress,

 KanalPrijema : ChannelTypeCd,

 Kategorija : NadleznaSluzba_c,

 Posiljatelj : SrCreatedBy,

 TicketStatusName : StatusTypeCd,

 IncidentId : SrNumber,

 AdresaKlijenta : PrimaryContactFormattedAddress

]

adf.webServices.ticketing_sistem_5.POST(POST_param)

def vo = newView('ServiceRequestVO')

def foundRows = vo.findByKey(key(SrNumber),1)

def found = foundRows.size() == 1 ? foundRows[0] : null;

if (found != null) {

 setAttribute('StatusTypeCd','SVC_SENT')

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!