cancel
Showing results for 
Search instead for 
Did you mean: 

Scheduled Workflow for a custom field in Ticket - SAP C4C

krishna1502
Participant
0 Kudos

Hi,

I have the following requirement in SAP C4C - Service.

Requirement:

A standard date time field "Completion Due" will be populated automatically on creation of a ticket.A custom field known as "Delayed" should have the value "Yes" when the current date is higher than the completion due.

Steps:

1. Created a scheduled workflow as shown below in the image.


2. No conditions were given.

3. An update to value "Yes" to the "Delayed" field was set.

Question:

Tried many combinations such as "0 Day Before Completion Due" , "0 Day on Completion Due" or even "1 Day after Completion Due". However this workflow seems to fail and the update of the field doesn't seem to happen. What am I missing?

Any response would be highly appreciated.

Thanks,

Krishna

Accepted Solutions (0)

Answers (2)

Answers (2)

seshukumarmv
Explorer
0 Kudos

Hi Krishna,

You can try the following,

In the Edit condition,

Field: Completion due date

Value before object change : yes

Compare operator: Greater than or equal to

With: Field.

If the due date is exceeded , user is going to change the old the completion due date to new proposed date , right?

Completion due date. Then write your action as field update delayed :yes

This should work.

Regards,

Seshu

PrasanthArya
Product and Topic Expert
Product and Topic Expert
0 Kudos

You cannot use workflow to compare to a dynamically changing date time value like current date time

but keeping the offset value as 0 days , can result in error Activation Occurs in the Past.

For example , if the completion due date time is 23.03.2020 18:00:00 , now as per the conditions system will trigger 0 days after the date which is again the same time which upon execution by the job scheduler (check : https://blogs.sap.com/2016/12/10/workflow-rule-configuration-considerations/) can happen in future , say (23.03.2020 18:10:00)

In this case , the execution planned time is in Past and system can fail this job, considering that this doesn't need an execution now

I would suggest you to keep a buffer of at least 5-10 mins as offset and define scheduling which should work as per my understading.

Other possible alternatives can be

1) make your List field delayed as mandatory based on condition evaluation and trigger an error message,so that the user will have to set it as true, as soon as the completion date crosses the current time point.

Below validation can be used.

Root.TP_CompletionDueDateTime.content>NOW()

2) Use SDK implementation