I have created a custom session with mandatory fields for Sales Order creation. Using DAL, I am able to successfully generate the Sales Order header details. However, I am facing an issue while trying to add lines to the Sales Order.
Hi Sameer,
Could you please provide more details on the issue that you are facing when trying to add sales order lines?
Are you getting an error message? If possible, please provide your code logic.
Yours, Stephan
Hi Stephan,
I am encountering the error “The Item field has an invalid value in Sales Order Lines” while inserting a sales order line into the tdsls401 table using DAL.
I also attempted using the standard functiontdsls.dll4041.generate.sales.orderline, but the same error persists.
tdsls.dll4041.generate.sales.orderline
However, when I create the sales order line manually through the session, the line is created successfully without any errors.
This issue appears to be specific to insertion via DAL/function, while standard session processing works as expected.
Y
When you set the value for the item field, are you considering the values from the first segment? like
Item " 123456"
Item.segment.1 = " " (9 caracters)
Item.segment.2 = "123456"
What LN version do you use?
Hi Fabiano,
We use LN 10.7 On-Prem. What you are suggesting is that I should assign the item with segments. However, when I use DAL, it is not accepting the segments properly.
When I assign the field data as:
dal.set.field("tdsls401.item", "1234567891234567891234")
it gives an "Invalid Item" error.
When I set it with segments and enable debug to trace the process, at the line where the segment was being assigned, it threw the following error:
Error: Cut-off in _get_sval() called by bshell function __dal_select_field. The entered string is 23 bytes long, exceeding the limit of 17 bytes. (dal.set.field() in object ottstpamdll)
_get_sval()
__dal_select_field
dal.set.field()
ottstpamdll
The process stopped at that point.
To use dal.set.field("tdsls401.item", " 123456") . my item have project so total length is 21.