Andy..
29th August 2006, 16:00
Hi, I have generated AFS for whinh2100s000 but it does not include the 2 buttons for to/from project. Looking at the forms, they are exec.user.0 and exec.user.1 - but they are nowhere to be found in the generated DLL. It does however include the inbound/outbound buttons...
function extern void whinh2100s000f.Inbound_Order_Lines( ref string error )
{
DLLUSAGE
Function to start form command Inbound Order Lines in session whinh2100s000
ENDDLLUSAGE
stpapi.form.command( "whinh2100s000", 5, "to.inbound.lines", error )
}
function extern void whinh2100s000f.Outbound_Order_Lines( ref string error )
{
DLLUSAGE
Function to start form command Outbound Order Lines in session whinh2100s000
ENDDLLUSAGE
stpapi.form.command( "whinh2100s000", 5, "to.outbound.lines", error )
}
So I guessed the correct command should be:
stpapi.form.command( "whinh2100s000", 5, "exec.user.1", error )
and used that to try and make it perform the 'to project' function...
stpapi.handle.subproc( "whinh2100s000", "whinh2112s000", "add" )
|CLICK 'To Project' button
stpapi.form.command( "whinh2100s000", 5, "exec.user.1", error ) |guess!
|put origin - transfer (manual) assume 3 as above
stpapi.put.field( "whinh2112s000", "whinh212.oorg", str$(3) )
|put order/set gen.orno / 1
stpapi.put.field( "whinh2112s000", "whinh212.orno", gen.orno )
stpapi.put.field( "whinh2112s000", "whinh212.oset", str$(1) )
|put project
stpapi.put.field( "whinh2112s000", "whinh212.cprj", ddc.cprj )
|put activity
stpapi.put.field( "whinh2112s000", "whinh212.cact", ddc.cact )
|put cost component
stpapi.put.field( "whinh2112s000", "whinh212.ccco", ddc.ccco )
|Click OK
ret=( stpapi.save( "whinh2112s000", error ) )
|get test
stpapi.get.field( "whinh2112s000", "whinh212.cprj", value ) |=project code
|end
stpapi.end.session( "whinh2112s000" , error )
but nothing happens, no errors appear in 'error', all ret=1 - final test value get is empty nothing seems to have happened! I've tried putting the exec.user.1 command in various places, none seem to work... HELP :confused:
function extern void whinh2100s000f.Inbound_Order_Lines( ref string error )
{
DLLUSAGE
Function to start form command Inbound Order Lines in session whinh2100s000
ENDDLLUSAGE
stpapi.form.command( "whinh2100s000", 5, "to.inbound.lines", error )
}
function extern void whinh2100s000f.Outbound_Order_Lines( ref string error )
{
DLLUSAGE
Function to start form command Outbound Order Lines in session whinh2100s000
ENDDLLUSAGE
stpapi.form.command( "whinh2100s000", 5, "to.outbound.lines", error )
}
So I guessed the correct command should be:
stpapi.form.command( "whinh2100s000", 5, "exec.user.1", error )
and used that to try and make it perform the 'to project' function...
stpapi.handle.subproc( "whinh2100s000", "whinh2112s000", "add" )
|CLICK 'To Project' button
stpapi.form.command( "whinh2100s000", 5, "exec.user.1", error ) |guess!
|put origin - transfer (manual) assume 3 as above
stpapi.put.field( "whinh2112s000", "whinh212.oorg", str$(3) )
|put order/set gen.orno / 1
stpapi.put.field( "whinh2112s000", "whinh212.orno", gen.orno )
stpapi.put.field( "whinh2112s000", "whinh212.oset", str$(1) )
|put project
stpapi.put.field( "whinh2112s000", "whinh212.cprj", ddc.cprj )
|put activity
stpapi.put.field( "whinh2112s000", "whinh212.cact", ddc.cact )
|put cost component
stpapi.put.field( "whinh2112s000", "whinh212.ccco", ddc.ccco )
|Click OK
ret=( stpapi.save( "whinh2112s000", error ) )
|get test
stpapi.get.field( "whinh2112s000", "whinh212.cprj", value ) |=project code
|end
stpapi.end.session( "whinh2112s000" , error )
but nothing happens, no errors appear in 'error', all ret=1 - final test value get is empty nothing seems to have happened! I've tried putting the exec.user.1 command in various places, none seem to work... HELP :confused: