Posts

Showing posts from February, 2021

How to disable enable action on page dynamically on user selection in Business central

  Disable / Enable Action  on Page with some Value. I came up to an requirement of enabling and disabling action coming on business central page and that should be on basis of some value i.e. I have list page of variants and i want to disable my action (Xyz) on that page if user has selected some variant named as Abc and if not then it should be enable likewise. Note : I used the property "Enabled" of actions in business central and acquired my need by binding it to some boolean variable that is having value true or false on some condition. And doing that whole story in page trigger  onaftergetcurrrecord() that is the trigger which is fired every time when user does some selection on list.  Here is the code snippet of my page extension. Code example : pageextension   50143  VariantListPageExt  extends  "Item Variants" {      layout     {          // Add ...