Hi!
I have defined in my BC default dimension shortcut codes for Sales Header and Sales Line.
In my application, I create sales invoices and its lines from code.
Setting the dimensions for the lines works fine:
InvoiceLine. "Shortcut Dimension 1 Code" := 'VALUE1'; InvoiceLine. "Shortcut Dimension 2 Code" := 'VALUE2';
On the other hand, when I do the same for the invoice header the values do not set:
InvoiceHeader. "Shortcut Dimension 1 Code" := 'VALUE1'; InvoiceHeader. "Shortcut Dimension 2 Code" := 'VALUE2';
In the debugger, I can see that in the code the values assign correctly for these fields. However, when I go into the created invoice and select "Invoice > Dimensions" I don't see the dimensions set.
How do I assign dimensions for the invoice header from the code? :)
Best Regards