How to send Parameter to scheduled Job?

IamAmolB
Tera Guru

Hi Experts,

I have a query, suppose i want to send some parameter to the scheduled job. can i send that and if it is possible how can we do that?
i requirement it satisfying with the on-demand Scheduled Job but i need to forward reference of one object with the same how can we do that?

Regards,

Amol Bavaskar

1 ACCEPTED SOLUTION

Script actions are the way to go.



1. Create an event.


2. Create Script Action attached to the event.


3. Fire the event from the UI Action with the required parameters.



Thanks


Srinivas


View solution in original post

8 REPLIES 8

paramveer
Mega Guru

You can not pass parameter to schedule job. If you want to set parameter then script include is the best way. You can write your code in script include then call the script include function including desired parameter.



Thanks,


Param


I want to schedule my code to run because it is taking so much time to execute, i want that code to run in background instead of user waiting for the result.



Is there any other way?


paramveer
Mega Guru

Use async business rule to run your code.


Yes, I was thinking about the same. But that business rule should run only when the "Delete Project" button is clicked. can we call that business rule from UI policy?