kazasaritha
29th September 2008, 08:43
Hi,
I am trying to approve purchase order in a customised session thru. AFS script. Some times it is working some times not. What might be the reason. I used the following script
--------------------------------------------------------------------
stpapi.put.field("tdpur4100m000","tdpur400.orno",str$(curr_orno))
stpapi.get.field("tdpur4100m000","tdpur400.orno",curr_orno)
ret = stpapi.find("tdpur4100m000",error.msg)
if ret = 1 then
ret = stpapi.mark("tdpur4100m000",error.msg)
if ret = 1 then
stpapi.get.field("tdpur4100m000","tdpur400.orno",curr_orno)
stpapi.form.command("tdpur4100m000",5,"approve.order",error.msg)
endif
endif
stpapi.end.session("tdpur4100m000")
-------------------------------------------------------------------
If I try to approve some times it is approving and some times not.
Thru. approve button it is approving properly in this type of cases also.
Even I am not getting the error message also.
Regards,
Saritha
I am trying to approve purchase order in a customised session thru. AFS script. Some times it is working some times not. What might be the reason. I used the following script
--------------------------------------------------------------------
stpapi.put.field("tdpur4100m000","tdpur400.orno",str$(curr_orno))
stpapi.get.field("tdpur4100m000","tdpur400.orno",curr_orno)
ret = stpapi.find("tdpur4100m000",error.msg)
if ret = 1 then
ret = stpapi.mark("tdpur4100m000",error.msg)
if ret = 1 then
stpapi.get.field("tdpur4100m000","tdpur400.orno",curr_orno)
stpapi.form.command("tdpur4100m000",5,"approve.order",error.msg)
endif
endif
stpapi.end.session("tdpur4100m000")
-------------------------------------------------------------------
If I try to approve some times it is approving and some times not.
Thru. approve button it is approving properly in this type of cases also.
Even I am not getting the error message also.
Regards,
Saritha