pralash
16th February 2018, 09:24
Hi,
I have stored the records in the baan table by using dal.new method... But when I referring the existing script some one follow the dal.new.object() function in order to store a record in the baan table.

Pleast let me know about that what is the main difference between these two function while perform the insert operation in baan table.

Thanks in advance,
Regards,
Pralash

bdittmar
16th February 2018, 22:43
Hello, multiple times you're told to draw attention on your Infor DEV-Guide.


dal.new.object()
Syntax:

function long dal.new.object (string tbl.name)

Description

Use this to indicate the DAL that a new record is about to be inserted. This function set record defaults, by calling db.set.to.default() and the set.object.defaults() hook.

After this call, fields can be set with dal.set.field(). And after that, the record can be saved with dal.save.object().

Arguments

string tbl.name A string containing the name of the DAL.

Return values

0 OK
DALHOOKERROR The DAL could not be opened

Context

This function can be used in all script types.

Hooks called

before.open.object.set() if this is the first call to the DAL
before.new.object()
set.object.defaults()


Refer to : kb 22924522

Regards

pralash
19th February 2018, 09:59
Thanks so much for this information....

Regards,
Prallash