Skip to main content
Solved

Validating Order Line Discount with Workflow

  • November 13, 2024
  • 3 replies
  • 86 views

Forum|alt.badge.img+10

I’m looking to add a condition on the customer order line discount :

 

 

 

 

When validation, I need to check the discount type then the discount % and Amt/

Then do some calculation based on customer loyalty program then authorize a certain amount or %.

 

I’m not able to identify the correct way to deploy the bpa.

 

 

I have added a new line to generate an error to detect the correct projection :

The error was generated when making a post on

customerOrderLineDiscountHandling.svc/CustOrderLineDiscountSet(Objkey='ACA0D85ED1304D0FA3399E6087493821')/CustOrderLineDiscountArray

 

The payload is the following :

 

I made a user validation workflow to just read those data for the moment

I have activated the workflow with debug enabled

 

When visiting the page OrderLine Discount, before making any thing I get an error.

By debugging the workflow I get :

 

 

Any idea on how to test the discount data please?

We are using IFS 23R1.13

Best answer by kamnlk

hi,

for the script task error i think there could be something wrong with the text of the script. if you have copy pasted that there is a chance some invisible special characters have come with the text that can cause this type of issues. i tried a similar code and it seem to work for me 

var strOrderNo = execution.getVariable('OrderNO'); 
var strLineNo = execution.getVariable('LineNo'); 
var StrReINO = execution.getVariable('ReINo'); 
var strLineItemNo = execution.getVariable('LineItemNo'); 
var strDiscount  = execution.getVariable('Discount'); 

 

View original
Did this topic help you find an answer to your question?

3 replies

Forum|alt.badge.img+10
  • Author
  • Hero (Customer)
  • 122 replies
  • November 13, 2024

@Lahirumala de Mel  @dsj if you have any thoughts on the matter it would be gladly appreciated

 


Forum|alt.badge.img+9
  • Hero (Employee)
  • 132 replies
  • Answer
  • November 14, 2024

hi,

for the script task error i think there could be something wrong with the text of the script. if you have copy pasted that there is a chance some invisible special characters have come with the text that can cause this type of issues. i tried a similar code and it seem to work for me 

var strOrderNo = execution.getVariable('OrderNO'); 
var strLineNo = execution.getVariable('LineNo'); 
var StrReINO = execution.getVariable('ReINo'); 
var strLineItemNo = execution.getVariable('LineItemNo'); 
var strDiscount  = execution.getVariable('Discount'); 

 


Forum|alt.badge.img+10
  • Author
  • Hero (Customer)
  • 122 replies
  • November 14, 2024

Thank you @kamnlk 

 

// I had : 

(‘Discount’);

// instead of : 

('Discount');

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings