g_form.addErrorMessage syntax is not working in client controller catalog item

String
Kilo Sage

Hi Team ,

am trying to print the error message in the portal using widget ,but not getting the error

Screenshot 2023-03-15 at 8.39.54 PM.png

 

Please help me wright syntax 

1 ACCEPTED SOLUTION

Prince Arora
Tera Sage
Tera Sage

@String , 

 

Could you please try this:

 


api.controller=function($scope,spUtil) {
/* widget controller */
var c = this;

$scope.myFunc = function(){
spUtil.addInfoMessage("There has been an error processing your request")
}

 

 

PRINCE_ARORA_0-1678897181791.png

 

If my answer solved your issue, please mark my answer as Correct & 👍Helpful based on the Impact.

View solution in original post

9 REPLIES 9

Hi @Prince Arora it works !!!

coming in green colour ,can we change in red colour .Is it possible ?

 

String_1-1678900464110.png

 

 

@String ,

 

else {
spUtil.addErrorMessage("There has been an error processing your request");
}


If my answer solved your issue, please mark my answer as Correct & 👍Helpful based on the Impact.

Thanks @Prince Arora 

is it possible to share the related document for my future referces like what is spUtils ,from where it is invoking ?

@String ,

 

Buddy! Google has everything 🙂 😛

@String ,

 

Please find some docs HERE