The CreatorCon Call for Content is officially open! Get started here.

If a caller updates or add additional comments then flagged (custom field ) must be checked true.

Hitesh Ramba
Tera Contributor

I want the flagged field (custom Field) to be checked true , whenever the caller of the incident updates or add additional comments on the incident form. How can i do it  using business rules. Please help me in this. 

4 REPLIES 4

Shubham26
Tera Guru

Hi @Hitesh Ramba  

 

I don't know your business requirement, as per scenario you provided it can be done via before update business rule.

You have to follow below stapes:

 

1. Create Business rule on incident table and checked advanced as True.

2. Update When to Run table as below:

 

Shubham26_0-1711698141284.png

 

3. Update action tab as below:

 

Shubham26_1-1711698191497.png

 

 

4. Save the business rule.

 

And this business set flagged as true either if user update caller on incident record or update additional comment field.

 

Please mark helpful or correct if above solution work for you. Or let me know if you need more details with your business requirement.

 

Thank You.

 

Regards,

Shubham Gupta

 

 

 

 

Pushpanjali
Tera Contributor

@Hitesh Ramba  

 

To ways you can go 

1. on change client script - on change of value your custom filed set as true /false

2. Using BR add condition- when to run condition

 

Please like or mark correct/Helpful based on the impact of the response.

 

Thanks & Regards,

Pushpanjali

 

Maddysunil
Kilo Sage

@Hitesh Ramba  

 

(function executeRule(current, previous /*null when async*/) {
    // Check if comments field has changed and caller is not empty
    if (current.comments.changes() && current.caller.getDisplayValue() != '') {
        // Set flagged field to true
        current.flagged = true;
    }
})(current, previous);

 

Please Mark Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.

 

Thanks

Amit Pandey
Kilo Sage

Hi @Hitesh Ramba  

 

Please try this code-

 

(function executeRule(current, previous /*null when async*/) {

    if (current.comments != previous.comments && current.caller_id == gs.getUserID()) {
  
        current.flagged_field = true;
    }
})(current, previous);

 

Please mark my answer helpful and correct.

 

Regards,

Amit