Forums

Forums / Developing Portals / How can I save current UserID and SystemDateandTime to fields

How can I save current UserID and SystemDateandTime to fields

Thread is closed for posting
2 posts, 1 answered
  1. sayyedrazam
    sayyedrazam avatar
    13 posts
    Registered:
    15 Apr 2015
    12 Jun 2015
    Link to this post
    I am updating a form and want to save data via Portal Form on who updated certain data at what time.

    How can I save logged in user`s ID and also System Date and Time to two fields in CRM
  2. Clinton Bale
    Clinton Bale avatar
    126 posts
    Registered:
    21 Feb 2014
    Answered
    16 Jun 2015 in reply to sayyedrazam
    Link to this post
    Hello Sayyed,

    You can use the CRM Static Value widget to populate the current user ID to a specific field by checking the "Use Logged In Users Contact ID" checkbox. To populate the current date-time to the field, I suggest using the modifiedon attribute for the record, it usually reflects the change time properly. Otherwise use a CRM Date-Time Field and use JavaScript to set it to the current date on load of the form.

    Regards,
    Clinton
2 posts, 1 answered