cancel
Showing results for 
Search instead for 
Did you mean: 

Company ID field not available for 'user' object in FreeMarker

purohitsumit
Champ in-the-making
Champ in-the-making
Hi,

I am trying to use user information in a Free Marker Template.


  <b>Id:</b> ${user.id}
  <b>Job Title :</b> ${user.jobTitle}
  <b>Location :</b> ${user.location}


works fine in my template page.
As an admin i create new users on repository webapp ( not share ) and there is a field "Company ID" which i fill-out for every user.
But as per documentation on http://docs.alfresco.com/4.2/topic/com.alfresco.enterprise.doc/references/APISurf-user.html there is no way to access companyid.

Am i missing something here ? or is there a way to access that field of user profile.
I am using alfresco 4.2.c

Thanks
Sumit Purohit

3 REPLIES 3

mitpatoliya
Star Collaborator
Star Collaborator
I think you are looking for "organization" which is there in list.

"organization" is a different field, which i agree is available. If we look at alfresco repo's user profile page, both "organization" and "company id" are there.

Thanks

krutik_jayswal
Elite Collaborator
Elite Collaborator
There are two type of values which are available in alfresco for person object.

CompanyId and OrganizationId

You can get both using below.

Below is for Company ID.

{http://www.alfresco.org/model/content/1.0}organizationId  : Returns value of company ID

equivalent Javascript code : person.properties["cmSmiley SurprisedrganizationID"]

Below is for organization ID.

{http://www.alfresco.org/model/content/1.0}organization    : Returns OrganizationId ID .

equivalent Javascript code : person.properties["cmSmiley Surprisedrganization"]