SmartClient Version: v11.1p_2017-12-10/AllModules Development Only (built 2017-12-10)
Chrome on OSX High Sierra
Hello, I've found a bug where the saveOperationType of a form doesn't change from add to update after a save operation.
It happens when the primary key field is visible in the form.
Please try this test case (I've run it in the #fetchOperationFS showcase sample):
Type and save some data, you'll see am add in the rpc tab of the dev console:
then modify something, for example unitCost, and save:
another add is performed. It happens also if the itemID form field has canEdit:false.
It doesn't happen if the itemID field is not declared or has showIf:"false"
Chrome on OSX High Sierra
Hello, I've found a bug where the saveOperationType of a form doesn't change from add to update after a save operation.
It happens when the primary key field is visible in the form.
Please try this test case (I've run it in the #fetchOperationFS showcase sample):
Code:
isc.ListGrid.create({ ID:"dsListGrid", width: "100%", height: "100%", autoFetchData: true, dataSource: "supplyItem" }); isc.DynamicForm.create({ ID:"dsForm", width: "100%", height: "100%", dataSource: "supplyItem", fields:[ {name: "itemID"}, {name: "itemName"}, {name: "SKU"}, {name: "category"}, {name: "unitCost"} ] }); isc.Button.create({ ID: "saveButton", title: "save", autoFit: true, click: function () { dsForm.saveData(); } }); isc.VLayout.create({ ID: "vLayout", overflow: "auto", width: "100%", height: "100%", members: [ saveButton, dsForm, dsListGrid ] });
Code:
{ dataSource:"supplyItem", operationType:"add", componentId:"dsForm", data:{ itemName:"test", SKU:"1234", category:"1", unitCost:1 }, ......
Code:
{ dataSource:"supplyItem", operationType:"add", componentId:"dsForm", data:{ itemName:"test", SKU:"1234", category:"1", unitCost:6, itemID:3969 }, ....
It doesn't happen if the itemID field is not declared or has showIf:"false"
Comment