baancust
1st November 2007, 14:48
Hi,

| Put the make item.
stpapi.clear("tibom1110m000")
stpapi.put.field( "tibom1110m000", "tibom010.mitm", makeitem )
rc = stpapi.change.view( "tibom1110m000", msg )

| Put the bom fields on the session form.
stpapi.put.field( "tibom1110m000", "tibom010.pono", str$(position) )
stpapi.put.field( "tibom1110m000", "tibom010.sitm", subitem )
stpapi.put.field( "tibom1110m000", "tibom010.cpha", str$(cpha) )
stpapi.put.field( "tibom1110m000", "tibom010.exin", exin )
stpapi.put.field( "tibom1110m000", "tibom010.qana", str$(quantity) )

stpapi.put.field( "tibom1110m000", "tibom010.seqn", str$(1) )
stpapi.put.field( "tibom1110m000", "tibom010.ltom", str$(tcyesno.no))

rc = stpapi.insert( "tibom1110m000", 1, msg )


I used this code but after insert msg was captured with a error "Editable Sychronised dialog not started".Please help me.
Regards,
Baancust.

mark_h
1st November 2007, 15:22
Your profile says Baan 4, but what version are you trying this on?

baancust
1st November 2007, 15:30
Hi,
We are Baan 4 but we are practising Ln on test server.

mark_h
1st November 2007, 16:34
If you are practising on the LN server then I would expect that for this session you would need a stpapi.synchronize.dialog command before the insert. It maybe as simple as stpapi.synchronize.dialog("tibom0110m000","add",msg) after the change view. Also keep in mind that items might be segmented. Since I am on 4c4 I can not really help with what works on LN.

Pieter van de L
1st November 2007, 18:23
For the item insert you schould use something like this
stpapi.put.field("tibom1110m000", "tibom010.sitm.segment.1",pr.item(1;9))
stpapi.put.field("tibom1110m000", "tibom010.sitm..segment.2", pr.item(10;37))
stpapi.put.field("tibom1110m000", "tibom010.sitm..segment.1",pr.item(1;9))
stpapi.put.field("tibom1110m000", "tibom010.sitm..segment.2", pr.item(10;37))

And put sychronize dialog.

It can olso be that it is a multiple table session in LN then AFS won't work and u have to use DAL2