layswan
9th January 2014, 08:24
Hi,

I used the function tcmcs.dll0050.check.and.generate.order.number() to autogenerate the first free number and the full code as shown as below:

choice.update.db:
before.choice:
seri.num = txswn050.orno

err = tcmcs.dll0050.check.and.generate.order.number(3, seri.num, "X01", 3, ord.no)

message("series number:%s", seri.num)
message("order number: %s", ord.no)
message("Err: %d", err)

But I get te value for Err: -12 which is DALHOOKERROR on errors.

So anyone has any idea on this error message mean?

Thanks!

bhushanchanda
9th January 2014, 10:06
Hi,


Try this:-

choice.update.db:
before.choice:
if update.status = modify.set then
....
endif

Try using the other ways too. Like.

main.table.io: or using DAL.

Check the Thread! (http://www.baanboard.com/baanboard/showthread.php?t=63698)

bhushanchanda
9th January 2014, 16:32
Hi,

I guess you have resolved this error in your this Thread. (http://www.baanboard.com/baanboard/showthread.php?p=186302#post186302)

vahdani
9th January 2014, 16:38
Hi layswan,

use show.dal.messages() to show the reason why DALHOOKERROR is raised:


choice.update.db:
before.choice:
seri.num = txswn050.orno

err = tcmcs.dll0050.check.and.generate.order.number(3, seri.num, "X01", 3, ord.no)
if err <> 0 then
show.dal.messages()
endif