mgakhar
12th November 2002, 01:25
Hi,
We've created a function server dll using ttstpcreatdll for Sales Orders. We needed to generate Sales Order and Lines.
The generation of Sales Order header works just fine. However, for the Lines, when we call the tdslsdllsoline.end() function, it doesnt switch back to the parent process (header).
The Sales Order Lines script has some changes like
if not api.mode then
switch.to.process(parent)
endif
As a result when I try to end the header process, it hangs.:mad:
Any idea as to how to get around this problem ??:confused:
Im attaching my code making calls to the functionserver dlls
tdslsdllslshdr.put.Sales_Order(orno)
tdslsdllslshdr.find()
tdslsdllslshdr.handle.sub.process("tdsls4105s000", "add") |* Sales Order Line session (Wholesale)
tdslsdllslshdr.continue(err.mess)
if isspace(err.mess) then
temp.orno = tdslsdllslshdr.get.Sales_Order()
|tdslsdllsoline.put.Sales_Order(temp.orno)
tdslsdllsoline.put.tdsls041.item(item)
tdslsdllsoline.put.Ordered_Quantity(qty) |* FS will do the check
tdslsdllsoline.put.Price(price)
pric = tdslsdllsoline.get.Price()
|tdslsdllsoline.put.Amount(amount)
tdslsdllsoline.put.tdsls041.odat(date.num())
tdslsdllsoline.handle.sub.process("tdsls0130s000", "kill")
tdslsdllsoline.insert(1, err.mess)
tdslsdllsoline.save(err.mess)
ret.pono = tdslsdllsoline.get.Position_Number()
tdslsdllsoline.put.Price(price)
tdslsdllsoline.update(1,err.mess)
tdslsdllsoline.save(err.mess)
tdslsdllsoline.end()
endif
tdslsdllslshdr.end()
We've created a function server dll using ttstpcreatdll for Sales Orders. We needed to generate Sales Order and Lines.
The generation of Sales Order header works just fine. However, for the Lines, when we call the tdslsdllsoline.end() function, it doesnt switch back to the parent process (header).
The Sales Order Lines script has some changes like
if not api.mode then
switch.to.process(parent)
endif
As a result when I try to end the header process, it hangs.:mad:
Any idea as to how to get around this problem ??:confused:
Im attaching my code making calls to the functionserver dlls
tdslsdllslshdr.put.Sales_Order(orno)
tdslsdllslshdr.find()
tdslsdllslshdr.handle.sub.process("tdsls4105s000", "add") |* Sales Order Line session (Wholesale)
tdslsdllslshdr.continue(err.mess)
if isspace(err.mess) then
temp.orno = tdslsdllslshdr.get.Sales_Order()
|tdslsdllsoline.put.Sales_Order(temp.orno)
tdslsdllsoline.put.tdsls041.item(item)
tdslsdllsoline.put.Ordered_Quantity(qty) |* FS will do the check
tdslsdllsoline.put.Price(price)
pric = tdslsdllsoline.get.Price()
|tdslsdllsoline.put.Amount(amount)
tdslsdllsoline.put.tdsls041.odat(date.num())
tdslsdllsoline.handle.sub.process("tdsls0130s000", "kill")
tdslsdllsoline.insert(1, err.mess)
tdslsdllsoline.save(err.mess)
ret.pono = tdslsdllsoline.get.Position_Number()
tdslsdllsoline.put.Price(price)
tdslsdllsoline.update(1,err.mess)
tdslsdllsoline.save(err.mess)
tdslsdllsoline.end()
endif
tdslsdllslshdr.end()