Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Inbound actions

kali
Tera Contributor

Hi All,

I am creating a inbound actions and i need to update  a reference field using scripting part of inbound actions. I am using to current. Fieldname = 'sys id of the value'; It is throwing an error cannot assign a null value. Kindly help me on this.

 

Thanks in advance

7 REPLIES 7

Rajesh Chopade1
Mega Sage

Hi @kali 

If possible, provide your script here.

Also check copied sys_id is correct.

One more suggestion - use system properties instead of direct sys_id in your codes.

 

THANK YOU

rajesh chopade

Hi @Rajesh Chopade1 ,

var emailid= email.from;
var match = emailid.split('@')[1].split('.')[0];
if(match == "gmail"){
    current.subcategory='32c383f61bab86506a74fd18cc4bcb40';

}

Hi @kali 

 

Could you try this once, this should work:

 

var emailid = email.from;

if (emailid) {
    var parts = emailid.split('@');
    
    if (parts.length > 1) {
        var domainParts = parts[1].split('.');
        
        if (domainParts.length > 0) {
            var match = domainParts[0];
            
            if (match === "gmail") {
                current.subcategory = '32c383f61bab86506a74fd18cc4bcb40';
            }
        }
    }
}

 

 

THANK YOU

rajesh chopade

ShubhamGarg
Kilo Sage

Hello @kali 

Have you tried setting value using setDisplayValue() ?

Kindly mark this as Accepted Solution/Helpful if it helps.

Regards

Shubham