According to an old Community post from philmodjunk, “A set field script step performed from this layout, that assigns data to a field in the related table will also create a related child record if no such child record exists…”
My POS interface file includes a SALEDB table (from the data file) and a related INTERFACESALEDB table. Based on the SALEDB context, a “set field” script step appears to be creating a child record in INTERFACESALEDB. This seems to work fine when run on the client.
However, when I run this script using PSOS, the script appears to fail at that point. I’ll double-check the context on the server, but I believe it’s the same as the local session.
Is there something else that would cause the “set field” step to fail?
When you perform PSOS the db opens on record one of the default layout. Your script parameters have to pass all the information you need to establish context and the correct found set.
When I say default layout I mean the layout that opens when the database opens. Chances of it being the layout that you want to use is most likely zero. The PSOS script has to go to the layout you want. It has to find the correct record. Then it can proceed.
@Malcolm — I’ve verified the layout and context are correct. However, after further debugging, I believe the script may be failing due to record locking. (“Get Last Error” returns error 301.) At this point, I’ll have to research how to deal with having the client and server both try to update the same record. Record locking is an area I’ve not yet had to traverse. Thanks for you assistance.