yuuvis® RAD Q&A

0 votes
by (750 points)

Hello,

is it possible to change the permitted editing time of a task in a script?

My goal is to show the user how much time is left before the cash discount of an invoice expires. Or are there any other solutions to achieve something like this?
It's important that the whole thing is visible at a glance in the inbox.

Best regards
Marcel

1 Answer

+1 vote
by (2.3k points)
selected by
 
Best answer

Hello Marcel,

this is actually easy and sraight forward ... if it where dokumented (I'll see to that).

The attribute you need to alter is dueTime in your workitem (activity). In the cases of the current activity that would be $.activity('this').dueTime.

in the following example i included moment js and used it for easy time handling to set the dueTime to tomorrow, same time as now:

load($.LIB_PATH + 'moment.min.js');
$.activity('this').dueTime = moment().add(1,'days').toISOString();

Regards,
Thomas

Related questions

0 votes
0 answers
asked Jul 21, 2021 by Marcel Maier (750 points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
...