Access to person.properties in a Share javascript
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2013 09:31 AM
Hi all, i have the following problem, i am in a javascript file (Share side) and i need to get the person.properties (as username, name, surname) but i saw that person is "undefined".
I searched on forums and i found that these properties are only accessible in the "repo" webscript (Alfresco side).
Is this the problem?
And how can i resolve?
Thanks!
I searched on forums and i found that these properties are only accessible in the "repo" webscript (Alfresco side).
Is this the problem?
And how can i resolve?
Thanks!
Labels:
- Labels:
-
Archive
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2013 01:44 PM
Hi
you need to call repository webscript in share side javascript and then use the response to read properties in share.
Regards
you need to call repository webscript in share side javascript and then use the response to read properties in share.
Regards
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2013 04:08 AM
Hi, thanks, can you provide a link/example?
In particular, in my js how can i call the webscript to find people?
Thanks!
In particular, in my js how can i call the webscript to find people?
Thanks!
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2013 03:48 AM
Hi, like below is the example script to call repository webscript in .get.js file of share
function main(){ var result = remote.connect("alfresco").get('api/people/userId?groups=true'); if (result.status == 200) { var person= eval('(' + result + ')'); var firstName = person.firstName, lastName = person.lastName; //to use thes values in ftl file we need to set in model model.firstName = firstName; }}// Start the webscriptmain();
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2013 03:56 AM
Thanks!

