Notifications
Announcements
No record found.
public static void forceAddFixedAsset(VendInvoiceInfoLine _vendInvoiceInfoLine) { VendInvoiceInfoLine_Asset VendInvoiceInfoLine_Asset; if(_vendInvoiceInfoLine.OrigPurchId != '')//Is Vendor Invoice line linked to PO. { PurchLine purchLine = PurchLine::findInventTransId(_vendInvoiceInfoLine.InventTransId); if (PurchLine) { if (PurchLine.AssetId != '') //Does purchase order line have a linked asset? { if(_vendInvoiceInfoLine.vendInvoiceInfoLine_Asset() == null) //If Vendor Invoice line is not linked to a FA already. { ttsbegin; VendInvoiceInfoLine_Asset = VendInvoiceInfoLine_Asset::createVendInvoiceInfoLine_Asset(_vendInvoiceInfoLine); VendInvoiceInfoLine_Asset.initFromPurchLine(purchLine); VendInvoiceInfoLine_Asset.AssetGroup = AssetTable::find(VendInvoiceInfoLine_Asset.AssetId).AssetGroup; VendInvoiceInfoLine_Asset.insert(); ttscommit; } else { Error('Supplier invoice line already has linked asset'); } } else { Error('Purchase order line has no linked asset'); } } else { Error('PurchLine cannot be found.'); } } else { Error('No OrigPurchId value'); } }
[ExtensionOf(tablestr(VendInvoiceInfoLine))] final class VendInvoiceInfoLine_bbs_Extension { public void insert(boolean _defaultRelatedTables) { next insert(_defaultRelatedTables); PurchParameters params = PurchParameters::find(); if(params.AutoApplyFixedAsset == NoYes::Yes) { ForceUpdateFixedAsset::forceAddFixedAsset(this); } } }
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 451 Most Valuable Professional
André Arnaud de Cal... 428 Super User 2025 Season 2
BillurSamdancioglu 239 Most Valuable Professional