Wednesday, 16 February 2022

Override lookup in form D365 FO

/// <summary>
/// This method is used for initialization
/// </summary>
public void init()
{
next init();

CustAccount.registerOverrideMethod(methodStr(FormDataObject, lookup), formMethodStr(CustPaymEntry, overridenCustAccountLookup));
}


/// <summary>
/// This method is used to get customer lookup
/// </summary>
/// <param name="_formControl" />FormControl
public void overridenCustAccountLookup(FormControl _formControl)
{
if (ledgerJournalTrans &amp;&amp; DDDIsParent.checked() == NoYes::Yes)
{
Debug::assert(ledgerJournalTrans.AccountType == LedgerJournalACType::Cust);
CustTable::lookupCustomer(_formControl, ledgerJournalTrans.Company);
}
}

No comments:

Post a Comment

DefaultDimension in d365 FO X++

 Navigate to PurchTable methods you can find with DefaultDimension this.DefaultDimension = this.mergeDimension(this.getDefaultDimension(),th...