Announcements
[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.
Jump in, show your community spirit, and win prizes!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Abhilash Warrier 635 Super User 2026 Season 1
André Arnaud de Cal... 595 Super User 2026 Season 1
Giorgio Bonacorsi 557