By using the Display BR that triggers when the Channel is set to "Email.

kranthi2
Tera Expert

Hi,

By using the Display BR that triggers when the Channel is set to "Email.

" This rule should display a field message that includes the Caller's email address"

 

Please help me out with the BR on the same requirement.

 

Thanks,

4 REPLIES 4

Viraj Hudlikar
Giga Sage

Hello @kranthi2 

VirajHudlikar_0-1737789040695.png

In Advanced section tab under script field do enter below code:

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

	// Get the Caller's email address
        var callerEmail = current.caller_id.email;
        // Display a field message with the Caller's email address
        gs.addInfoMessage('Caller\'s email address: ' + callerEmail);

})(current, previous);

 

If my response has helped you hit helpful button and if your concern is solved do mark my response as correct.

 

Thanks & Regards
Viraj Hudlikar.

 

Hi @Viraj Hudlikar 

It works, thanks.

@SreenadhV - Glad that it helped you.

You can also mark it as helpful 👍

 

Juhi Poddar
Kilo Patron

Hello @kranthi2 

Create a Display Business Rule and set the condition to trigger when the Channel field is set to Email.

Business Rule Script:

(function executeRule(current, previous /*null when async*/) {
        // Get the Caller's email address
        var callerEmail = current.caller_id.email;
        // Display an info message with the Caller's email address
        gs.addInfoMessage('The Caller's email address is: ' + callerEmail);
})(current, previous);

This will display an info message on the form with the Caller's email address.

Note: Displaying a field message is not possible using Business Rules alone.

To display a field message, you will need to write an additional UI Policy or Client Script.

Hope this helps!

 

"If you found my answer helpful, please like and mark it as an "accepted solution". It helps future readers to locate the solution easily and supports the community!"

 

Thank You
Juhi Poddar