- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2018 05:15 AM
I have a requirement to create a UI action on incident form and when the user clicks the button for 3rd time, i need to set the state to resolved and add resolution code and notes.
I created a UI action 'Caller' as form button on incident form. I am stuck at the point where i need to calculate the number of times the UI action button is clicked.
If any one have worked on this before could you please help me.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2018 05:25 AM
u_click_count can be a field of String type with default value as 0
if(current.u_click_count == '3'){
current.state = 6;
current.close_code = 'Your_value';
current.close_notes = "Your_value";
current.update();
}else{
//Increment your clicks
current.u_click_count = parseInt(current.u_click_count)+1;
current.update();
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2018 05:23 AM
What should happen for the first and second time ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2018 05:23 AM
Hello,
You need to create a field and store the number of count and use it to determine your trigger.
if(current.u_click_count == '3'){
//Resolve
}else{
current.u_click_count = parseInt(current.u_click_count)+1;
current.update();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2018 05:25 AM
u_click_count can be a field of String type with default value as 0
if(current.u_click_count == '3'){
current.state = 6;
current.close_code = 'Your_value';
current.close_notes = "Your_value";
current.update();
}else{
//Increment your clicks
current.u_click_count = parseInt(current.u_click_count)+1;
current.update();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2018 06:11 AM
I do not want to create any field. Can we not directly get the click count from the action button ?