Quantcast
Channel: Discussion Forum > Connect Data Services
Viewing all articles
Browse latest Browse all 2504

CPM script running recursively (1 Comment)

$
0
0

Topic by Bipin Mittal

Content

Hi,

I have written a CPM script that runs on Incident update and checks for the value of a custom field. If the value is 1, it updates the incident. Everything works fine except the fact that whenever I update and save the incident, the incident thread gets updated 5 times.

I have added the below line of code already.

if ($cycle !== 0) return;

But, this does not help. I have also noticed that, if at the end of the code that updates the incident, I make the custom field value as 0, it does not update the incident multiple times. But, this does not looks logical and moreover, I do not want to make the value of the custom field again to zero.

 

Can anyone please suggest some solution here.

Thanks,

Bipin

Version

Feb'2014

Viewing all articles
Browse latest Browse all 2504

Trending Articles