Skip to main content

I am quite new to workflows and I faced following issue while trying out workflows.

I have implemented 2 workflows for mandatory field check on 2 fields during the creation and the update of a record.

 

Field 1 - Expiration Date

The Expiration Date is checked if it is null, and if so an error is displayed.

 

The two javascripts written for the validations are,

  1. execution.getVariable('ExpirationDate') == null
  2. execution.getVariable('ExpirationDate') == ''

 

Field 2 - Salesman Code

The Salesman Code is checked if it is null, and if so an error is displayed.

 

the three javascript scripts written for the validations are,

  1. execution.getVariable('SalesmanCode') == null
  2. execution.getVariable('SalesmanCode') == ''
  3. execution.getVariable('SalesmanCode') == ""

Both workflows are triggered during the creation and update of the record.

 

Now the problem is, When I try to update a record that has a SalesmanCode but no Expiration Date, it still triggers the workflow for SalesmanCode and gives the error as Salesperson is Mandatory which is wrong.

 

Could you help me figure out what could be the reason for this?

Hi @YashP,

If you disable the Expiration Date workflow for a bit and let only the Salesman Code workflow trigger do you still get the same error or is it different?

/Lahirumala


Hi @Lahirumala de Mel 

Yes, I get the same issue even after disabling expiration date validation.

 

/Yashodha


Hi,

 

I was able to solve the issue by adding a IFS Projection task before the gateway.

 

 

From the task, I read the record I want to update and then pass it through the gateway to check the null value.

 

Thought this might help.

/Yashodha


Reply