NetTalk Central

Author Topic: How Postupdate works? I really confuse about it  (Read 2484 times)

skyong38

  • Newbie
  • *
  • Posts: 34
    • View Profile
    • Email
How Postupdate works? I really confuse about it
« on: May 14, 2018, 10:38:46 PM »
Hi,

I have search the forum, and knowing that the Postinsert/postupdate is the place to embed code before save.

LocUserID = p_web.GetSessionValue('LoginName')
I want to assign some value to field, I tried :-
1) p_web.SetSessionValue('JSDW:CreatedUserID', LocUserID)
Or
2) JSDW:CreatedUserID = LocUserID

Both doesn't write the value to file.

Where am I goes wrong?

Thank you.

Regards,
Nelson



Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11186
    • View Profile
Re: How Postupdate works? I really confuse about it
« Reply #1 on: May 15, 2018, 03:16:33 AM »
>>  and knowing that the Postinsert/postupdate is the place to embed code before save.

no, those embeds are for code _after_ the save is made.

For _before_ the record is saved use ValidateRecord, ValidateInsert, ValidateChange and so on.

Cheers
Bruce

skyong38

  • Newbie
  • *
  • Posts: 34
    • View Profile
    • Email
Re: How Postupdate works? I really confuse about it
« Reply #2 on: May 15, 2018, 06:10:54 AM »
Hi Bruce,

Thanks for advice. I manage to get it done.

Regards,
Nelson