itconsultant
20th January 2016, 15:38
Hi,
I am trying to create AFS for serial item creation as follows. Serial item is not getting created. There is synchronized dialog session which opens from main session.

stpapi.put.field("tcibd4501m000","tcibd401.item",nhsfc202.item)
stpapi.put.field("tcibd4501m000","tcibd401.sern",nhsfc202.clot)
ret = stpapi.find("tcibd4501m000",error.msg)

if ret=1 then
else
stpapi.synchronize.dialog("tcibd4501m000","add",error.msg)
stpapi.handle.subproc("tcibd4501m000","tcibd4101s000","add")
stpapi.put.field("tcibd4101s000","tcibd401.item",nhsfc202.item)
stpapi.put.field("tcibd4101s000","tcibd401.sern",nhsfc202.clot)
stpapi.put.field("tcibd4101s000","tcibd401.stat",
str$(etol(tcibd.ssts.used.in.as.buil)))
stpapi.put.field("tcibd4101s000","tcibd401.psta",str$(etol(tcibd.ssts.initial)))
stpapi.put.field("tcibd4101s000","tcibd401.usf1","Cert ")
stpapi.insert("tcibd4101s000",true,error.msg)
ret = stpapi.update("tcibd4101s000",1,error.msg)
endif

if isspace(error.msg) then
else
stpapi.recover("tcibd4101s000", error.msg)
stpapi.recover("tcibd4501m000", error.msg)
endif
stpapi.end.session("tcibd4101s000")
stpapi.end.session("tcibd4501m000")

Error message shows that value is not getting assigned to item field.

mark_h
20th January 2016, 15:53
From the example in the document - don't you execute the update on the main session and not the synchronized session. So wouldn't the update command need to have tcibd4501m000 instead of the 4101s000 session?

I am on 4c4 so can't test or try this type command.

itconsultant
21st January 2016, 11:11
Hi Mark,
I tried putting main session in the stpapi.update command. Am still getting an error message.

mark_h
21st January 2016, 15:55
What error message do you get? Another thought went thru my mind - could that item be segmented?