Highlighted
Super Contributor.. Super Contributor..
Super Contributor..
97 views

Initiate a notificati​on through a trigger

Jump to solution

 

I am trying to send a notification for a line item when the line item status=ordered and the approval status=approved.  Since these fields are performed in the background a simple notification statement asking for this does not work. 

So, I think my best option would be to invoke a trigger on the ocml using the RAD us.notify.  This sort of works as when I have this trigger active, I get error message stating

"No notification record found for type: ocml={["Q174105-001", 1, 1222604, "Monitor", "Monitor", "Monitor", "requested", "Q174105", , , , ,"

This means the trigger I created is actually working but I do not know how to code the javascript within the trigger to call the notification I want.

Looking to see if anyone knows thejavascript for this?

Thanks!

0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Initiate a notificati​on through a trigger

Jump to solution

Hi, Can you please share if your issue is resolved ? If yes then you can post the answer here, it ll help others too. If not then you can log a case with HP Software support or Professional Services for customization requests.
Regards,
HPE Software Support

View solution in original post

0 Likes
6 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Initiate a notificati​on through a trigger

Jump to solution

Can you show us the code you have right now in the trigger?

0 Likes
Highlighted
Super Contributor.. Super Contributor..
Super Contributor..

Re: Initiate a notificati​on through a trigger

Jump to solution

I actually have no code within the trigger.  I just have the RAD identified using us.notify

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Initiate a notificati​on through a trigger

Jump to solution

Nice try, but you have to pass us.notify some parameters first.  Try putting this into the JavaScript part.  You need to replace the part I put in tags with the name of your notification record you are try to call:

 

var CallRAD=lib.c.$.callrad;
var Notification="<put the name of the notification record here>"
var param={"name":Notification, "record":record, "second.file":oldrecord};
CallRAD("us.notify",param);

0 Likes
Highlighted
Super Contributor.. Super Contributor..
Super Contributor..

Re: Initiate a notificati​on through a trigger

Jump to solution

Almost.  However, I am getting this error now

"Script <no name> line 1: ERROR TypeError: lib.c has no properties at char 1"

Did I need to modify line 1 in some way?

0 Likes
Highlighted
Established Member..
Established Member..

Re: Initiate a notificati​on through a trigger

Jump to solution

What's version you are using? 

Yon can try to search scriptlibrary "c" in your system. 

Also i want to say send a notification in a trigger is not a good way.  the best way is send the trigger in your business logic.

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Initiate a notificati​on through a trigger

Jump to solution

Hi, Can you please share if your issue is resolved ? If yes then you can post the answer here, it ll help others too. If not then you can log a case with HP Software support or Professional Services for customization requests.
Regards,
HPE Software Support

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.