Forum Discussion

Former_Member's avatar
Former_Member
Accelerator III
8 years ago

Get item from id in Javascript

Hello, In javascript i would like to get the firstname and lastname properties of a user from a created_by_id, is there a method in JS that get an item by its Id? I failed to find documentation on the aras items manipulation in javascript, if anyone could tell me where i could find some so i dont have to post whenever i have a question :p Thank you. Léo

3 Replies

  • Manage to fix the issue :
    replace var inn = this.getInnovator() with var inn = aras.IomInnovator;
    Thanks again and hope it will help others !
  • Hi Léo, here is a short snippet for getting a user from its id
    var inn = this.getInnovator();
    var user= inn.getItemById("user","<the user id you look for>");
    var firstname = user.getProperty("first_name","");
     
  • Hi Yoann, Thank you for your fast response, but i am getting the following error with your code : Event handler failed with message: TypeError: this.getInnovator is not a function i am trying to run it in a method called on form populated