• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

AIS Form P42101 Submitting with Warnings

MrsRansom

Member
Hello!

I'm having an issue where I'm trying to submit an order with the P42101 form through AIS when warnings are present. When I submit a normal order with no warnings, I'm not having an issue, my JSON goes through fine, and I get an order number and my order is saved to the database. When I submit an order with warnings with the P42101 I can basically spam the "Save and Continue" (form control ID 138) and it gives me an order number BUT it never saves to the database.

My current steps are:
Login to AIS - get token
Add Order Request - W42101C
Add Order Headers - W42101E
Save Order Headers - W42101E
Add Order Details - W42101D
Submit Order Headers - W42101D (ad nauseam until correct request is given)

When using the P4210 with AIS, all I had to do to save an order with warnings was to submit it twice. Is there a magical step I'm missing? (Fingers very crossed.)

Any and all help is highly appreciated!
 
Last edited:

Marcia HR

Active Member
This sounds like what is reported in
AIS: How to Bypass Warnings With JSON Calls (Doc ID 2196828.1)

How to bypass warnings when using JSON calls to JDE applications?
For example when creating sales order in JDE with the P42101 for some items there can be several types of warnings which can be ignored and still saving the order.
[FONT=&quot]"Warning: Order Quantity Exceeds what Available (030B)
CAUSE . . . . There is not enough available quantity to completely ship this order.
RESOLUTION. . This is a warning. The order will exhaust current availability, then backorder or cancel the remaining order quanitity if specified in the processing option. "[/FONT]

The same behavior is required for JSON calls as well, to bypass the error in order to save the order.
[h=2]SOLUTION[/h]The property to be used for bypassing warnings in JSON calls is "stopOnWarning": "false" .
stopOnWarning - (optional) use TRUE or FALSE constant, stop processing the form when error or warning is thrown in E1, false will allow you to bypass warnings.
When testing using SoapUi, the warning will still be returned in the response document whereas the processing will continue to complete within E1.

Exception Note:
For the application P42101 (Manage Existing Order) there is an issue with enforcing this property.
According to development there is Event Rule in the P42101 application (on the Save and Continue button) that requires the button be pressed twice in order for the sales order to be created.
The manual ER in the Save and Continue button is required in order for the subform warnings to properly bubble up to the parent power form. So the ER cannot change.
Still this is conflicting with the "stopOnWarnings=false".
Since the application logic cannot change there are the following workarounds:
1. Use P4210 (Customer Service Inquiry) in the appstack request. This application does not use power forms, so the ER for Save button is different and works well in conjunction with "stopOnWarnings=false".
2. Create a version of sales order that does not do this inventory check (processing option) and use that for application stack requests for JSON calls.
 
Top