[ExtensionOf(tableStr(SalesTable))] final class DTCustomerCodeSalesTable_Extension { void insert(boolean _skipMarkup) { this.custAccountModified(); next insert(_skipMarkup); } void custAccountModified() { CustParameters custParameters; SalesTable salesTable; select firstonly DTCustomerCode from custParameters where custParameters.DataAreaId == this.DataAreaId; if(this.ISLFOC == NoYes::Yes) { if(custParameters.DTCustomerCode != "") { if(custParameters.DTCustomerCode != this.CustAccount) { this.CustAccount = custParameters.DTCustomerCode; } } } } }
void custAccountModified() { if(this.ISLFOC == NoYes::Yes) { CustParameters custParameters; SalesTable salesTable; select firstonly DTCustomerCode from custParameters; //no need for DataArea where condition if(custParameters.DTCustomerCode != "" && custParameters.DTCustomerCode != this.CustAccount) { this.CustAccount = custParameters.DTCustomerCode; } } }
[ExtensionOf(tableStr(SalesTable))] final class DTCustomerCodeSalesTable_Extension { void insert(boolean _skipMarkup) { FieldId _fieldId; this.modifiedField(_fieldId); next insert(_skipMarkup); } public void modifiedField(FieldId _fieldId) { next modifiedField(_fieldId); if (_fieldId == fieldNum(SalesTable, CustAccount)) { this.custAccountModified(); } } void custAccountModified() { CustParameters custParameters; SalesTable salesTable; select firstonly DTCustomerCode from custParameters where custParameters.DataAreaId == this.DataAreaId; if(this.ISLFOC == NoYes::Yes && custParameters.DTCustomerCode != "" && custParameters.DTCustomerCode != this.CustAccount) { this.CustAccount = custParameters.DTCustomerCode; } } }
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 724 Most Valuable Professional
André Arnaud de Cal... 619 Super User 2025 Season 2
Sohaib Cheema 400 User Group Leader