cancel
Showing results for 
Search instead for 
Did you mean: 

How to create an alert in a script

Former Member
0 Kudos

Dear Colleagues,

I would like to know if it's possible to create an alert which should be displayed then in the communication channel of a specific user in a custom script.

If it's possible could you please share what Class method should I user?

Regards,

Martin

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Martin,

There is no Class/API exposed for alerts.

Regards,

Subhasini

Former Member
0 Kudos

Hello Subhasini,

thanks a lot for your response.

Do you think is there any other way to create an alert from a custom script?

Regards,

Martin

Former Member
0 Kudos

Are you trying to do something like an alert in javascript?

Try this:

1. Create an extension field of type BigText (this can be made hidden through page customization)

2. Write the following script in your script. I put it on load of the document. you can put it in any event.

String str = "<body onLoad=\"alert('this is from my alert');\"/>";

BigTextIfc st = doc.getExtensionField("MRO_TEST").get();

st.setText(str);

However, you can condition it based on your requirement.

Hope this helps.

Regards,

Bindu Sharma

Former Member
0 Kudos

Hello Bindu,

thanks a lot for your response.
What I need to do is to create an alert from a script that will be executed thorugh a schedule task. Based on some MA validations the script should create the alert and send it to the corresponding user. Then this user got the alert in the workbench page.

The problem is that there is no IAPI method to create the alert...

Regards,

Martin

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Take a look at this link.It might help you.

http://www.techrepublic.com/forums/questions/create-a-scheduled-task-script/

Regards,

Ritika Garg