Jordi.Tolra
10th October 2012, 15:06
Hola a tohom,
I'm working with an AFS to Maintain Period status (tfgld0107m000).
I simply find the record to modify and fill in the 4 fields to update and I execute the update.
My problem is that one of the fields has to be changed before the orders (it has an after.input check).
Is there a way in the AFS session to force the order in which the fields are updated?
The code is the following:
fiscal.period = tfgld.ptyp.financial
tax.period = tfgld.ptyp.vat
status.open = tfgld.sper.open
status.closed = tfgld.sper.closed
mess.update = ""
ok = 0
ok.find = 0
cdll0107.put.fiscal_year(year.f)
cdll0107.put.period_number(prno.f)
cdll0107.put.period_type(fiscal.period)
ok.find = cdll0107.find()
if ok.find then
ok = 0
cdll0107.put.Status_of_GLD(status.open) |# 1
cdll0107.put.Status_of_CMG_Module(status.open) |# 2
cdll0107.put.Status_of_ACR_Module(status.open) |# 3
cdll0107.put.Status_of_ACP(status.open) |# 4
ok = cdll0107.update(1, mess.update)
endif
In principle the order of the field input should be the one in the program, but it seems that it is not the case when the Update is done.
Does anybody know how to force this order?
thanks & regards
Jordi
I'm working with an AFS to Maintain Period status (tfgld0107m000).
I simply find the record to modify and fill in the 4 fields to update and I execute the update.
My problem is that one of the fields has to be changed before the orders (it has an after.input check).
Is there a way in the AFS session to force the order in which the fields are updated?
The code is the following:
fiscal.period = tfgld.ptyp.financial
tax.period = tfgld.ptyp.vat
status.open = tfgld.sper.open
status.closed = tfgld.sper.closed
mess.update = ""
ok = 0
ok.find = 0
cdll0107.put.fiscal_year(year.f)
cdll0107.put.period_number(prno.f)
cdll0107.put.period_type(fiscal.period)
ok.find = cdll0107.find()
if ok.find then
ok = 0
cdll0107.put.Status_of_GLD(status.open) |# 1
cdll0107.put.Status_of_CMG_Module(status.open) |# 2
cdll0107.put.Status_of_ACR_Module(status.open) |# 3
cdll0107.put.Status_of_ACP(status.open) |# 4
ok = cdll0107.update(1, mess.update)
endif
In principle the order of the field input should be the one in the program, but it seems that it is not the case when the Update is done.
Does anybody know how to force this order?
thanks & regards
Jordi