Add Purchase Order item

  • Last Post 2 weeks ago
Lars Urban posted this 3 weeks ago

Hello All,

is there a way that i can add this in a programatic way ?
I Merge at this time a value from a other place to the purchase order group.
But it was only added in "Background"  --> means, when i click on Add Purchse Order Item it is prefilled.


Attached Files

Order By: Standard | Newest | Votes
Lars Urban posted this 2 weeks ago

No Idea ? =`(

hawkeye69 posted this 2 weeks ago

Well, in the FCI demo there is a workflow stage called "Clear Line Items". This is backwards, it deletes. But there is an "AddNew" method. Perhaps this will get you going. Code below.


if (Document.Field("Invoice Layout\\PurchaseOrder").Items.Count == 0)


    for (int i = Document.Field("Invoice Layout\\LineItems").Items.Count - 1; i >= 0; i--)


        IField  objDeleteField = Document.Field("Invoice Layout\\LineItems").Items[i];

        Document.Field("Invoice Layout\\LineItems").Items.Delete(objDeleteField);



Adrian Enders