Cannot insert direct unit cost on purchase line from WS

gmorkengmorken Member Posts: 38
edited 2012-11-24 in NAV Three Tier
Hello,
I trying to insert price direct unit cost in purchase line but it doesnt get inserted. Everything else that I inserts gets inserted into NAV.
Running NAV 2009 R2 SP1.

Anyone?
the code:
purinv.PurchLines = purinv.PurchLines.Concat(new[] { new Purch_Invoice_Line()
                {
                     Type = wsPurchaseInvoice.Type.G_L_Account,
                     No = "4210",
                     
                     Direct_Unit_Cost = 111
                     Shortcut_Dimension_1_Code = "460",
                     Line_Discount_Percent = 12
                    
                 
            
                }
            
                }).ToArray();
            service.Update(ref purinv);

Comments

  • gmorkengmorken Member Posts: 38
    ok I think you cant initialize and assign properties without doing update first. So the order should be:
    1. create blank line
    2. update
    3. update blank line
    4. update

    My fault.
Sign In or Register to comment.