Access to currentUser information in Custom JS

Forums Dynamic Forms for SharePoint Access to currentUser information in Custom JS

This topic contains 1 reply, has 1 voice, and was last updated by  Peter Giesselink 5 months, 2 weeks ago.

  • Author
    Posts
  • #23772

    Peter Giesselink
    Participant

    In a rule I set the field value of a [Note] field with the following instruction in the Value field : “prepend:{CurrentUser:FirstName} {CurrentUser:LastName} {timestamp}/n{Comment}”
    This works perfect but I want to use a more complex function in the Custom JS section.

    My question is: Are there functions available in de dffs namespace which fetch the same user information as with the {currentUser} identifier?
    required fields are:
    {currentUser}
    {currentUser:FirstName}
    {currentUser:LastName}
    {currentUser:MobilePhone}
    {currentUser:WorkPhone}
    {currentUser:UserName}
    {currentUser:Department}
    {currentUser:EMail}

  • #23774

    Peter Giesselink
    Participant

    Looked in the wrong namespace, spjs.utility.userProfile() will do the job.

You must be logged in to reply to this topic.