NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: terryd on June 02, 2010, 04:30:38 AM
-
I call the following procedure routine from the PostInsert 1 Start Embed
SetClaimStatus ROUTINE !Set the value of ClaimStatus dependant on pickup value and Collection Authorisation No
WDOCREAS:Pickup = p_web.GSV('WDOCREAS:Pickup')
WCLM:CollectionAuthorisationNo = p_web.GSV('WCLM:CollectionAuthorisationNo')
IF WDOCREAS:Pickup = 0
WCLM:ClaimStatusID = 4 !Collected/Finalised
ELSE
IF WCLM:CollectionAuthorisationNo = ''
WCLM:ClaimStatusID = 2 !Authorisation O/S
ELSE
WCLM:ClaimStatusID = 3 !Waiting Colloection
END
END
p_web.SSV('WCLM:ClaimStatusID',WCLM:ClaimStatusID)
! MESSAGE('WCLM:ClaimStatusID' & WCLM:ClaimStatusID)
Exit
The value in the MESSAGE('WCLM:ClaimStatusID' & WCLM:ClaimStatusID) is correct but the value in the file after the record is saved is not changed to whatever value is in WCLM:ClaimStatusID.
Is this the right embed or is there something I am doing incorrectly?
-
try the validateInsert embed
-
PostInsert happens after the Insert call, so if you change the record at that point you'll need to Update it yourself.
Or, use ValidateRecord, or ValidateInsert routine to do work on the record before it is inserted.
-
Thanks Kevin and Bruce. Working fine now