Dialog in X++ Code


I want to create a dialog in X++ Code.

I have a lookup dialogfield where I can choose a VendorId from VendorTable. Now I have another dialogfield and I want it to display the VendorName of the selected VendorId.

How can I get the dialog to update the dialogfield and show the VendorName?


Write code as dialog.allowUpdateOnSelectCtrl(true); in dialog method

and under dialogselectcontrol() method u can automatically fill the vendore name as

Vendtable Vendtable;
Vendtable = Vendtable ::find(fieldAccount.value());
fieldName.value(Vendtable .Name);


you can override the method “DialogSelectControl” to get the vendors name.

I still don’t understand how I can implement these methods.

Could you explain a bit more?


hope this helps u