Get Author (Created By) via JS

Home Forums General discussion Get Author (Created By) via JS

Viewing 1 reply thread
  • Author
    Posts
    • #36071
      becca
      Participant

        I’m sure this is answered somewhere but I can’t find it, how can you get an item’s author via JS? I tried all the varieties of getFieldValue field names I can think of for Created By but I’m guessing since it isn’t a proper field I need some kind of get context instead. I know this can be done via rules but I personally don’t like to use rules, I code all my logic so it’s easier to follow. (this is in edit so Created By is already set)

      • #36072
        becca
        Participant

          nvm, found it in some of my ancient notes, if anyone else needs this solution it’s
          if (parseInt(spjs.dffs.beforeProperties.Author_ID)==parseInt(user.ID)){/*code*/}

      Viewing 1 reply thread
      • You must be logged in to reply to this topic.