AIS Form P42101 Inserting Rows

MrsRansom

Member
Hello!
Recently in my company we've gone from using just normal REST with AIS to using the AIS Client libraries that Oracle supplies. So far everything is going well, except (of course) on the P42101_W42101D form. I can add a new sales order in, but I can't seem to be able to add the sales order rows in. I think the issue is related to the Oracle AIS Client documentation stating:

Inserting grid rows
This action enables you to insert one or more rows into a grid, setting the column value for each row. This includes text entry columns, drop-down columns, or check box columns. You must include an OK button pressed event to commit the inserts.

I don't see anything that says "OK" on that row in the form. Am I missing something? Is it the "Check Availability" button I should be pressing?

This is my code that inserts the rows for reference (in Java):
//Before this I've already called to make the order, and set the sales order headers

ActionRequest gridActionRequest = new ActionRequest();

gridActionRequest.setFormOID("W42101D");



FSREvent gridFSRE = new FSREvent();

GridAction gridAction = new GridAction(loginEnv);
gridAction.setGridID("188_20");

List<OrderRequestItem> items = req.getItems();

for (Integer i = 0; i < items.size(); i++) {
GridRowInsertEvent gri = new GridRowInsertEvent();
gri.setGridColumnValue("21", items.get(i).quantity);

gri.setGridColumnValue("23", items.get(i).sku);

gridAction.insertGridRow(i.toString(), gri);

}

gridFSRE.addGridAction(gridAction);

gridActionRequest.addFSREvent(gridFSRE);



response = appStackAddress.executeActions(loginEnv, gridActionRequest);



While this doesn't throw any errors or warnings it also doesn't add any rows in. I'm hoping against hope someone else has run into this and can help! Any and all help is always very appreciated :D
 
In case anyone runs across this issue again, I'm posting the answer here, I hope it helps someone in their time of need.

Change the line:
gridAction.insertGridRow(i.toString(), gri); to gridAction.insertGridRow(gri);

It won't work on an insert if you tell it what rows you want to insert, even though the documentation does it that way. :confused:
 
Back
Top