38
Views
3
Comments
Solved
A secured way to change timer´s schedule from user side

Hi, 

I am looking for the best way to add scheduled hours to a timer from the user side, but as the schedule column is from a System Entity I do not know how to do it in a proper/secure way. 

I know I should use the CreateOrUpdateCyclic_Job_Shared but to be able to change it from user side, do they need admin permissions? or is there any other secured way?


Thanks a lot!



Solution

Hi Maria,


You can update that Cyclic_Job_Shared table with the user input, you only need to be careful with the syntax.

In the Schedule attribute you can specify the same schedule as in Service Studio (or Service Center).


These are the values accepted:

● Hour and Minute (e.g. "16:15").

● Hour and Minute followed by a List of Days of the Week ("e.g. 22:00 Mon Fri").

● Hour and Minute followed by the Month's Day Number (e.g. "15:30 16").

● Hour and Minute followed by the Month's Week and Day of the Week (e.g. "00:15 2nd Tue").

● When Published (e.g. “When Published”).


And you probably only want to give this functionality to users with a specific role, so I would add this feature to a screen only accessible by users with some admin role. 

And if you want to be extra careful, also check the role, before updating the record.


Let me know if this helps,

Pedro

After updating Cyclic_Job_Shared table with user input using UpdateCyclic_Job_Shared action, the schedule is reflecting in cyclic_job_shared entity. But timer available under processes tab, does not show same schedule. Is there any way for timer (in service center or service studio) possess same user schedule programmatically than manual setting?


Hi Pedro, 


perfect solution. As Cyclic_Job_Shared is a system entity I wasn´t sure about the security practises I should implement but I am now, thanks to your answer. 

+ Role

+ Screen Access

+ Check the role before CRUD


Thank you so much. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.