Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Client script in portal widget

abhaysingh98
Tera Contributor

Hi All,

 

I am new to service portal, as I tried to get a field value using client script on portal widget I am able to display message from html when field value is changed but not able to display anything when record is saved without changing the field value.

 

$scope.$on("field.change", function(evt, parms) {
if (parms.field.name == 'is_empty1')
c.data.is_empty1 = parms.newValue;
});

 

This is the code I have used its working fine when I change the value and save the record but its not working when I save the record without changing the value. when I save the record without changing the value then current message does not display I want to show that message when record is saved without changing the value. 

6 REPLIES 6

Hi @yuvrajkate, its not working.

the second function for record save is not executing only first function for field change is working.