Eddie Monster
7th December 2005, 22:23
I am fairly inexperienced with AFS, but I am trying to use it to automate the insertion of manually created commission lines. When I try to compile my code I receive an error message stating that there is an unresolved reference to stpapi.synchronize.dialog function.
Perhaps it isn't available for Baan IVc4?
Can anyone confirm? - and if this particular function is not available in Baan IVc4, how would I accomplish the insert using AFS?
function insert.incentive.payment.line()
{
domain tcmcs.str100 error.msg
domain tcmcs.long return.value
stpapi.clear("tdcms0150m000")
stpapi.put.field("tdcms0150m000","tdcms050.orno", str$(ws.orno))
return.value = stpapi.change.view("tdcms0150m000", error.msg)
if return.value = 1 then
return.value = stpapi.synchronize.dialog("tdcms0150m000", "add", error.msg)
if return.value then
stpapi.put.field("tdcms0150m000","tdcms050.pono", str$(ws.pono))
stpapi.put.field("tdcms0150m000","tdcms050.reln", str$(ws.reln))
| stpapi.put.field("tdcms0150m000","tdcms050.sern", "2")
stpapi.put.field("tdcms0150m000","tdcms050.cmpr", str$(ws.incentive.pctg))
stpapi.put.field("tdcms0150m000","tdcms050.grpc", "0")
stpapi.put.field("tdcms0150m000","tdcms050.amnt", str$(invoice.amount))
stpapi.put.field("tdcms0150m000","tdcms050.amta", "0")
stpapi.put.field("tdcms0150m000","tdcms050.crtp", "200")
stpapi.put.field("tdcms0150m000","tdcms050.lacd", "73040")
stpapi.put.field("tdcms0150m000","tdcms050.lacc", "32020")
stpapi.put.field("tdcms0150m000","tdcms050.resv", "1") | Reserve = "Yes"
stpapi.put.field("tdcms0150m000","tdcms050.ttyp", ws.ttyp)
stpapi.put.field("tdcms0150m000","tdcms050.invn", str$(ws.invn))
return.value = stpapi.insert("tdcms0150m000", true, error.msg)
if not return.value then
return.value = stpapi.recover("tdcms0150m000", error.msg)
endif
endif
endif
stpapi.end.session("tdcms0150m000")
}
Perhaps it isn't available for Baan IVc4?
Can anyone confirm? - and if this particular function is not available in Baan IVc4, how would I accomplish the insert using AFS?
function insert.incentive.payment.line()
{
domain tcmcs.str100 error.msg
domain tcmcs.long return.value
stpapi.clear("tdcms0150m000")
stpapi.put.field("tdcms0150m000","tdcms050.orno", str$(ws.orno))
return.value = stpapi.change.view("tdcms0150m000", error.msg)
if return.value = 1 then
return.value = stpapi.synchronize.dialog("tdcms0150m000", "add", error.msg)
if return.value then
stpapi.put.field("tdcms0150m000","tdcms050.pono", str$(ws.pono))
stpapi.put.field("tdcms0150m000","tdcms050.reln", str$(ws.reln))
| stpapi.put.field("tdcms0150m000","tdcms050.sern", "2")
stpapi.put.field("tdcms0150m000","tdcms050.cmpr", str$(ws.incentive.pctg))
stpapi.put.field("tdcms0150m000","tdcms050.grpc", "0")
stpapi.put.field("tdcms0150m000","tdcms050.amnt", str$(invoice.amount))
stpapi.put.field("tdcms0150m000","tdcms050.amta", "0")
stpapi.put.field("tdcms0150m000","tdcms050.crtp", "200")
stpapi.put.field("tdcms0150m000","tdcms050.lacd", "73040")
stpapi.put.field("tdcms0150m000","tdcms050.lacc", "32020")
stpapi.put.field("tdcms0150m000","tdcms050.resv", "1") | Reserve = "Yes"
stpapi.put.field("tdcms0150m000","tdcms050.ttyp", ws.ttyp)
stpapi.put.field("tdcms0150m000","tdcms050.invn", str$(ws.invn))
return.value = stpapi.insert("tdcms0150m000", true, error.msg)
if not return.value then
return.value = stpapi.recover("tdcms0150m000", error.msg)
endif
endif
endif
stpapi.end.session("tdcms0150m000")
}