I everyone,
We are on Infor EAM 11.3 Build 201804.
I am using afterloaddata to set fields to protected
This is an example (for those who want to try it out) using the Infor Parts screen
In this example if the Part class is TIRE I set Class, Description and UOM to protected
This works great if the Screen has Startup Action set to "No Action" in the block User Settings in the Screen application
So we have
Startup Action: No Action
Start View: Split View
Split View Display: Mixed
As I was working on a bigger piece of code I got tired of always clicking the magnifying glass to get the first record to display
So I changed the User Settings of the screen to
Startup Action: Run Dataspy
Start View: Split View
Split View Display: Mixed
The Run Dataspy causes the following problem: the First record that is displayed has class TIRE yet none of the fields are protected. As I start clicking on other records everything that has class TIRE will be protected.
It seems that afterloaddata is not triggered for the first record that shows up in the list therefore a user could make changes to the class, description or uom even if it should be protected.
Is this normal?
Everyone who has posted setting fields to protected use event afterloaddata has left their screens to Startup Action: No Action?
BTW same problem happens if I set fields to protected on the manufacturer tab. All the fields are available and someone could add records. As soon as you click an existing record in the list you see that all fields are protected.
Thanks,
Ext.define('EAM.custom.external_sspart', { extend : 'EAM.custom.AbstractExtensibleFramework',
getSelectors : function () {
return {
'[extensibleFramework] [tabName=HDR][isTabView=true]': {
afterloaddata: function() {
var vFormPanel = EAM.Utils.getCurrentTab().getFormPanel();
var vClass = vFormPanel.getForm().findField("class");
var vClassValue = vClass.getValue();
if (vClassValue == "TIRE") {
var vFocus = this,
vFormPanel = vFocus.getFormPanel();
EAM.Builder.setFieldState({'description':'protected'},vFormPanel.getForm().getFieldsAndButtons());
EAM.Builder.setFieldState({'class':'protected'},vFormPanel.getForm().getFieldsAndButtons());
EAM.Builder.setFieldState({'uom':'protected'},vFormPanel.getForm().getFieldsAndButtons());
}
}
}
}
}
});