Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 175888

Using Oninitialized form datasource event handler .

$
0
0

hi,

i need to make some changes to the standard form in 

Cash and bank management > Inquiries and reports > Checks 

so i created an extension of the form and added the required fields. i need to perform some functionality as well but i am not able to do anything since the entire form is not editable. on checking the datasourse property i fount the allowedit(), allowcreate(), allowdelete() all were set to NO.

so i created created a class and pasted the Oninitialized form datasource event handler and wrote the below code.

but it doesn't seem to be working.

public static void BankChequeTable_OnInitialized(FormDataSource sender, FormDataSourceEventArgs e)
{
BankChequeTable bankChequeTable ;
FormDataSource bankChequeTable_ds = sender.formRun().dataSource('BankChequeTable');
FormRun element = sender.formRun();
bankChequeTable_ds.allowEdit(true);
bankChequeTable_ds.allowCreate(true);
bankChequeTable_ds.allowDelete(true);

}

 


Viewing all articles
Browse latest Browse all 175888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>