Liferay Javascript - How to get global scope ID?

Gwowen Fu, modified 11 Years ago. Expert Posts: 315 Join Date: 12/27/10 Recent Posts
Hi,

I need to create a renderURL for an article stored in Global scope.
The following code will not work because the group ID is the site user logged in, not the global site.
How could I get the global scope ID from Liferay Javascript?

    var url = Liferay.PortletURL.createRenderURL();
    url.setPortletId("56");
    url.setWindowState('EXCLUSIVE');
    url.setParameter("_56_groupId", themeDisplay.getScopeGroupIdOrLiveGroupId());
    url.setParameter("_56_articleId", articleId);


Thank you!
Gwowen
Gwowen Fu, modified 11 Years ago. Expert Posts: 315 Join Date: 12/27/10 Recent Posts
Found the answer.
    var url = Liferay.PortletURL.createRenderURL();
    url.setPortletId("56");
    url.setWindowState('EXCLUSIVE');
    url.setParameter("_56_groupId", themeDisplay.getCompanyGroupId());
    url.setParameter("_56_articleId", articleId);