<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Liferay Javascript - How to get global scope ID?</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=50199255" />
  <subtitle>Liferay Javascript - How to get global scope ID?</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=50199255</id>
  <updated>2026-04-05T23:08:29Z</updated>
  <dc:date>2026-04-05T23:08:29Z</dc:date>
  <entry>
    <title>RE: Liferay Javascript - How to get global scope ID?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=50199393" />
    <author>
      <name>Gwowen Fu</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=50199393</id>
    <updated>2015-03-11T22:07:09Z</updated>
    <published>2015-03-11T22:07:09Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Found the answer.&lt;br&gt;&lt;pre&gt;&lt;code&gt;    var url = Liferay.PortletURL.createRenderURL();
    url.setPortletId("56");
    url.setWindowState('EXCLUSIVE');
    url.setParameter("_56_groupId", themeDisplay.getCompanyGroupId());
    url.setParameter("_56_articleId", articleId);&lt;/code&gt;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Gwowen Fu</dc:creator>
    <dc:date>2015-03-11T22:07:09Z</dc:date>
  </entry>
  <entry>
    <title>Liferay Javascript - How to get global scope ID?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=50199254" />
    <author>
      <name>Gwowen Fu</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=50199254</id>
    <updated>2015-03-11T21:42:36Z</updated>
    <published>2015-03-11T21:42:36Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi,&lt;br&gt;&lt;br&gt;I need to create a renderURL for an article stored in Global scope.&lt;br&gt;The following code will not work because the group ID is the site user logged in, not the global site.&lt;br&gt;How could I get the global scope ID from Liferay Javascript?&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;    var url = Liferay.PortletURL.createRenderURL();
    url.setPortletId("56");
    url.setWindowState('EXCLUSIVE');
    url.setParameter("_56_groupId", themeDisplay.getScopeGroupIdOrLiveGroupId());
    url.setParameter("_56_articleId", articleId);&lt;/code&gt;&lt;/pre&gt; &lt;br&gt;&lt;br&gt;Thank you!&lt;br&gt;Gwowen&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Gwowen Fu</dc:creator>
    <dc:date>2015-03-11T21:42:36Z</dc:date>
  </entry>
</feed>
