You need to sign in to do that
Don't have an account?
querying for Profile Name
Hi,
I'm trying to retrieve "Standard User" from the Name field of the Profile object with the following query: "select Id, Name from Profile where Name = Standard User" but that always complains about a malformed query.
So I tried "select Id, Name from Profile" and then cast the result into Profile objects, and then scan for a Profile with Name equal to "Standard User". However, the contents of the Profile names are unexpecting:
PT1
Custom: Marketing Profile
Custom: Sales Profile
Custom: Support Profile
PT2
PT3
PT4
PT5
PT6
The Profile names represented by the PT# different for different logins, and so I cannot consistently select Standard User. Any clues, hints?
Thanks,
Tan
Hi ttrieu,
Interesting behavior. I don't like it. I'll see if this is intended or not and if we can request a change or if we can rely on a correlation between PT# and a standard profile name.
Cheers.
Hi ttrieu,
I have some more information about your post. The profiles represent a special challenge in that the profile names are stored with a level of indirection. The PT# represents a "label". As you know, we support 11 languages in the product. Standard User for instance, will be represented differently in the user's chosen language. This means we cannot store the name directly in the object, but need to store a pointer to a label table that contains Standard User. This makes querying on the profile name difficult. We realize that this is making your job difficult and are working to come up with a solution so that you can query on the profile name.
In the mean time, you can use the actual id's of the profiles in your queries. You can obtain them from the ui. We are aiming for our next major release to have a fix for this issue.
Cheers
Thanks for the info, and I'll work with the id's in the query.
Tan
Dave,
Is there a solution in version 5 for this problem? I could use a locale-based web service api call for my app.
Thanks,
Tim
Profile names are still not available. Please respond, Shall i change it to Hardcoded in the application.
Thanks
Gagan
So, the standard profile names are not available.
The mapping seems to be
PT1 = System Administrator
PT2 = Standard User
PT3 = Read Only
PT4 = Solution Manager
PT5 = Marketing User
PT6 = Contract Manager
So, now if my user's langauge is French, I get the French translation for the profile names.
What I would like to do is always get the English version of the profiles names.
Message Edited by AlanF on 08-17-2006 09:15 AM