Monday, August 29, 2022

How to use Electronic Signature before inserting data into a table through x++ in D365 Fin Ops

 

Validation of data through Electronic Signatures has become one of the most commonly used processes in any ERP. This helps us to ensure data validation before any transaction is committed.

The Info class has a method named collectESignature which enables us to ensure whether electronic signature is provided properly or not. We can use this in our code before committing a particular transaction.


Note : - The Code block should not be inside Transaction Tracking System ( ttsbegin or ttscommit)

Here is sample code to show the implementation : -




boolean             flag = false;

CustTable          custTable;

custTable.AccountNum =  'A1101';

custTable.CustGroup =  'C02';

custTable.PaymTermId = '5D';

flag = info.collectESignature(DatabaseLogType::Insert , custTable);

if(flag)
{
   custTable.insert();
}
else
{
   throw error('Electronic Signature verification failed. Please try again');
}


That's all for now. Please let us know your questions or feedback in comments section !!!!

How to create a computed column in a view through x++ in D365 F&O ?

Computed columns in D365 Finance and Operations (D365 F&O) are extremely useful when you want to add dynamic values in views, which are ...