//Hold the SalesParmTable record protected void endParmUpdate() { SalesParmTable salesParmTableCopy; SalesParmTable salesParmtable; SalesParmLine salesParmLineCopy; SalesParmLine salesParmLine; SalesParmUpdate salesParmUpdate; RecordInsertList list = new RecordInsertList(tablenum(SalesParmLine)); RecordInsertList listSalesParmTable = new RecordInsertList(tablenum(SalesParmTable)); formletterParmUpdate formletterParmUpdate = this.formletterParmUpdate; FormletterParmTable formletterParmTable = this.formletterParmTable; if (formletterParmUpdate.TableId != tableNum(FormletterParmUpdate)) //Ensure that the map is initialized { ttsbegin; select firstonly forupdate formletterParmUpdate where formletterParmUpdate.ParmId == parmId; select salesParmUpdate where salesParmUpdate.ParmId == parmId; if (formletterParmUpdate) { if (this.canDeleteFormletterUpdate() && this.proforma && salesParmUpdate.xxProFormaInvoiceNumber == NoYes::Yes) { while select salesParmtable order by SalesId where salesParmtable.ParmId == parmId { salesParmTableCopy.data(salesParmtable); listSalesParmTable.add(salesParmTableCopy); while select * from salesParmLine where salesParmtable.ParmId == salesParmLine.ParmId && salesParmtable.TableRefId == salesParmLine.TableRefId { salesParmLineCopy.data(salesParmLine); list.add(salesParmLineCopy); } } } } ttscommit; } next endParmUpdate(); if (formletterParmUpdate.TableId != tableNum(FormletterParmUpdate)) //Ensure that the map is initialized gg { ttsbegin; if (formletterParmUpdate) { if (this.canDeleteFormletterUpdate() && this.proforma && salesParmUpdate.xxProFormaInvoiceNumber == NoYes::Yes) { salesParmTableCopy.selectForUpdate(true); //salesParmTableCopy.insert(); listSalesParmTable.insertDatabase(); list.insertDatabase(); salesParmTableCopy.reread(); } } ttscommit; } }
[ExtensionOf(classStr(FormletterService))]
final class MyFormletterService_Extension
protected void endParmUpdate()
{
SalesParmTable salesParmTable;
while select salesParmTable
where salesParmtable.ParmId == parmId
{
info(salesParmTable.SalesId);
}
next endParmUpdate();
}
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,900 Super User 2024 Season 2
Martin Dráb 229,275 Most Valuable Professional
nmaenpaa 101,156