Skip to main content

Posts

Showing posts from October, 2016

Toggling visibility of fields in a Grid in then preview Pane of a ListPage form using code

Tasked with hiding a specific field on the salesLine table in the sales order forms depending on the value of a field on SalesTable I searched for methods and came across: https://community.dynamics.com/ax/f/33/t/168729 I agree with the method of finding the field on the datasource of the formpart however a better method of making the field invisible is to reference formDataSource.object(fieldnum( , )).visible(true/false); instead of actually having to reference the form control. This will make the field visible/invisble anywhere in the form that the field of the datasource is used. In my case it was done like this: private void toggleintraCodeReturn() {     PartList    pl;     int pCount,partdsCount;     FormRun part;     boolean shown;     FormDataSource pfds;     FormDataSource  fds,partfds;     shown = this.currentSalesTable().CustMaterial == NoYes::Yes;     if (this.c...