Announcements
/// <summary> /// Optionally sets the status of the corresponding <c>PurchLine</c> to be set to Open order as there /// is a saved pending invoice against the <c>PurchLine</c>.Optionally activates the Purchase Request /// workflow.Create a <c>SourceDocumentLine</c>. /// </summary> /// <param name="_defaultRelatedTables"> /// True if related tables should be defaulted on insert; otherwise false. This parameter would /// typically be false when <c>VendInvoiceInfoLine</c>records are copied between the saved and active /// images of this document. /// </param> /// <remarks> /// Inserting will cause the status of the corresponding <c>PurchLine</c> table to be set to open order /// as there is a saved pending invoice against the <c>PurchLine</c> table. /// </remarks> public void insert(boolean _defaultRelatedTables = true) { PurchLine purchLine; VendInvoiceInfoTable vendInvoiceInfoTable = this.vendInvoiceInfoTable(); //Custom Code added 09/07/2024 MyCustomTable myCustomTable; //Custom Code ttsbegin; // Insert and reference a source document line SourceDocumentProcessorFacade::submitSourceDocumentLineImplementation(this); super(); this.SysExtensionSerializerMap::postInsert(); if (this.DocumentOrigin != DocumentOrigin::Service) { // Only delete tax information if the invoice line is not being inserted via AIF. TaxUncommitted::deleteForDocumentHeader(vendInvoiceInfoTable.TableId, vendInvoiceInfoTable.RecId); // Delete tax Withhold information. if (TaxWithholdParameters_IN::checkTaxParameters()) { TaxWithholdUncommitted_IN::deleteForDocumentHeader(vendInvoiceInfoTable.TableId, vendInvoiceInfoTable.RecId); } } // Update header round-off amounts. vendInvoiceInfoTable.updateFromVendLines(); if (_defaultRelatedTables) { if (this.isNonPO()) { this.createMarkupTrans(this.vendInvoiceInfoTable()); VendInvoiceInfoLine_Asset::createVendInvoiceInfoLine_Asset(this).insert(); } else { purchLine = PurchLine::findInventTransId(this.InventTransId, true); if (purchLine.RecId !=0) { purchLine.setPurchStatus(true); //COR submit to workflow if(purchLine.PurchaseType == PurchaseType::Purch) { if(purchLine.calcPendingMatchedQtyPurch() < purchLine.calcPendingQtyPurch()) { PurchCORInvReceivedWorkflow::submit(purchLine); } } //Custom Code added 09/07/2024 myCustomTable=MyCustomTable::findPurchLine(this.PurchLineRecId); this.myCustomField=myCustomTable.myCustomFld; //Custom Code } } } // <PubSect> if (this.isActive()) { this.updateVendInvoiceProjectFromBudgetRes(true, false); } // </PubSect> // <GTE> if (TaxSolutionScopeIntegrationUtil::isCompanyEnabled()) { this.markCurrentTaxDocumentTaxStatusDirty(); } // </GTE> ttscommit; }
//Custom Code added 09/07/2024 myCustomTable=MyCustomTable::findPurchLine(purchLine.RecId); this.myCustomField=myCustomTable.myCustomFld; //Custom Code
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 345 Most Valuable Professional
CU10121822-0 304
André Arnaud de Cal... 283 Super User 2026 Season 2