How to activate another button using click event of certain button in MS Dynamics AX?

StackOverflow https://stackoverflow.com/questions/21455689

  •  05-10-2022
  •  | 
  •  

Question

I'm creating a new form in Axapta. How can I make a Show-->Line View to be activated by clicking on New--> Item? Should I do this by X++ override methods or it is possible not to use code?

Was it helpful?

Solution

I think it can only be done with code. Override your datasource's create() method and then call the button clicked() method. Note that to call directly the button's Auto declaration propery need to be set to Yes.

For instance in a SalesTable form you could overwrite SalesTable.create() method :

void  create(boolean  append = true)
{
    SalesTable   newSalesTable;

    EditDetailsButton.clicked();

    // rest code goes here

}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top