Inserting Sales Line - Poulete item desc, special price, etc

markclemarkcle Member Posts: 65
Hi All

Creating my first extension. One of the functions is to add a line item for freight based on the ship method.

When I'm using the UI, I select line type "Item" and enter item No 'FLOC' (for example). when I tab out of that field it will lookup the item desc, , posting groups, customer special pricing.

this is my code:
SalesLine.Init;
SalesLine."Document Type" := rec."Document Type";
SalesLine."Document No." := rec."No.";
SalesLine.Type := SalesLine.Type::Item;
SalesLine."No." := 'FLOC';
SalesLine.Quantity := 1;
SalesLine.Insert()

It adds the item, but doesn't lookup the description, etc.

What do I need to do to make it behave like the UI?

Thanks

Mark

Best Answer

Answers

  • markclemarkcle Member Posts: 65
    thanks. That did it
Sign In or Register to comment.