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 reverse Free Text Invoice Voucher entries without Dialog

 Hey Folks ,  This blog post is in continuation of the previous post for Reversing Free Text Invoice Voucher entries with Dialog. Only diffe...