Quantcast
Channel: Baanboard.com
Viewing all articles
Browse latest Browse all 4216

Error when using DAL to insert a date field

$
0
0
I am working on a customized session where I am trying to insert a Sales Order Line into a Sales Order Header using DAL.

Code:

if dal.new.object("tdsls401") <> 0 then
        dal.get.error.message(error.msg)
        return(error.msg)
endif
dal.set.field("tdsls401.orno", i.sales.order)
dal.set.field("tdsls401.ofbp", i.stbp)
dal.set.field("tdsls401.odat", utc.num()) |* The error occurs when I add this line
dal.set.field("tdsls401.pono", i.position)
dal.set.field("tdsls401.item", i.item)
dal.set.field("tdsls401.qoor", i.qty)
dal.set.field("tdsls401.pric", i.price)
dal.set.field("tdsls401.ldam", i.discount)
if dal.save.object("tdsls401") <> 0 then
        dal.get.error.message(error.msg)
        return(error.msg)
endif

See the error in attached image.
The error happens when it reaches "dal.set.field("tdsls401.odat", utc.num())".
If I don't add the line, it will display another error Release Date is required but it is also a date field, which I also cannot solve that error even when I send a date.

Any help is appreciated.

Attached Images
File Type: png sol-odat-error.png (19.4 KB)

Viewing all articles
Browse latest Browse all 4216

Trending Articles