I have an extension class on form ReqTransPo.
I need to on initialized reference the method InventDimSetupObject().
[FormEventHandler(formStr(ReqTransPo), FormEventType::Initialized)]
public void ReqTransPo_OnInitialized(xFormRun sender, FormEventArgs e)
{
showStorageDimensionColumns = NoYes::Yes;
InventDimParm InventDimParmLocal = sender.inventDimSetupObject().inventDimSetupObject.parmDimParmVisibleGrid();
InventDimParmLocal.InventLocationIdFlag = true;
InventDimParmLocal.InventSiteIdFlag = true;
}
However I get the error: Class 'xFormRun' does not contain a definition for method 'inventDimSetupObject'.
This method is under the form methods and it is not defined as private or protected, which in both cases won't allow me to access it in an extension.
So how do I get ahold of it? I need to load the form with the inventory dimension InventLocationId and InvetnSiteId visible in the grid by default. The user doesn't want to every time they go into this form to have to click on view > Display > Dimensions and select warehouse and site.
Any suggestions are much appreciated.