Customize - Optimizer hide Inventory information on OITM

Emmanuel Bachellard

Hi,


 


I would like to use an optimizer rule to hide some field for some user.


I known there is a specific function, but I don't want to hide the field for the super user (as super users have all the authorisations, Coresuite automatically hide the fields).


 


I start to build a script.


I want to hide information on the item master data OITM(150)


It is working when I want to hide a field like ItemName (item 7), I use the following code :


 


Item.GetFromUID(pVal.Form, "7").Visible = false;


 


==> All good


 


But when I want to do that for the inventory info (grid/matrix in inventory data) (item 28)


 


   Item.GetFromUID(pVal.Form, "28").Visible = false;


 


==> is not working, nothing is hidden


 


Thank you

Paolo Manfrin

Hi Emmanuel,


I think the problem is that you need first to put in focus the Tab where the grid is laying.


 


Try Item.GetFromUID(pVal.Form, "TABID").Click(regular)


  Item.GetFromUID(pVal.Form, "28").Visible = false;


 


hth


paolo


Emmanuel Bachellard

OK, perfect.


Thank you Paolo.


 


FYI, I used this code:


 


    Item.GetFromUID(pVal.Form, "26").Click(SwissAddonFramework.UI.Components.Item.ClickType.Regular);

    Item.GetFromUID(pVal.Form, "28").Visible = false;


0

Comments

0 comments

Please sign in to leave a comment.

Didn't find what you were looking for?

New post