Skip to content

Commit

Permalink
Fixing Post Install Namespace Issue
Browse files Browse the repository at this point in the history
  • Loading branch information
adityanaag3 committed Sep 10, 2020
1 parent 358e1f8 commit d90cfe3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ You can optionally also install the guest version of the player app on Heroku to
</li>
<li>Once the installation is successful, Open the Developer Console and go to Debug -> Execute Anonymous Window. </li>
<li>Paste the following code, and click <b>Execute</b>
<pre>String namespace = PlanningPokerCtrl.getNameSpace(true);
PlanningPokerPostInstallScript.insertPushTopics(namespace);</pre>
<pre>
planningpokersf.PlanningPokerPostInstallScript.insertPushTopics();</pre>
</li>
<li>To make a Salesforce user the host of a game, assign the <code>Planning Poker Host</code> permission set to them.</li>
<li>Assign the <code>Planning Poker Player</code> permission set to any users who want to participate as players.</li>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
global class PlanningPokerPostInstallScript implements InstallHandler {
global void onInstall(InstallContext context) {
if (context.previousVersion() == null) {
String namespace = PlanningPokerCtrl.getNameSpace(true);
insertPushTopics(namespace);
insertPushTopics();
}
}

public static void insertPushTopics(String namespace) {
global static void insertPushTopics() {
String namespace = PlanningPokerCtrl.getNameSpace(true);

List<PushTopic> pushTopics = new List<PushTopic>();

PushTopic pushTopic = new PushTopic();
Expand Down
3 changes: 1 addition & 2 deletions scripts/apex/createPushTopics.apex
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
String namespace = PlanningPokerCtrl.getNameSpace(true);
PlanningPokerPostInstallScript.insertPushTopics(namespace);
PlanningPokerPostInstallScript.insertPushTopics();

0 comments on commit d90cfe3

Please sign in to comment.