Convert SO to Invoice

Has anyone manage to create Sales Invoice from Sales Order?

Nothing extreme, just standard fields.

Tables: Customers, Order, Order Line Items linked to Inventoy Items -> Invoice, Invoice Line Items.

I can't understand the loop function for line items.


2 replies

    • Alexander_Koenig
    • 5 yrs ago
    • Reported - view

    Hi, this works by creating an invoice.

    Then loop over the order items where the link to the order is the current one.

    Then create invoice items and link them the new created invoice.


    let myId := _id;

    let c := create invoice

    for i in select 'Order Line Items' where Order = _id

    let ilt := create 'Invoice Line Items' 

    ilt.invoice := c._id

    Let me know if this helps or join our webinar:


    Best regards, Alex

    • Michael
    • 5 yrs ago
    • Reported - view


Content aside

  • 5 yrs agoLast active
  • 2Replies
  • 1662Views