• Rogerio Da Silva
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
Hi There,
I am using Lightning Experience, I created an App and I set Page D to be my first page when I access the App, there I have a link to Page E. If I log out and access SF again and click on App Launcher and click on my App, it loads the page D, but if I click on the link that I have in Page D that redirects to Page E, I got this error message in console:
 
Uncaught (in promise)
YB {component: "laf:appLayoutHost$controller$handlePageReferenceTransaction"....
"Action failed: laf:appLayoutHost$controller$handlePageReferenceTransaction [[LAF:AppLayoutHost:extractPageLevelReference] Expected app-level reference but got {"type":"standard__directCmpReference","attributes":{"name":"one:alohaPage","attributes":{"address":"https://xxx-dev-ed.lightning.force.com/apex/Page_E"}},"state":{}}]"
 
If I click on the Tab that I called Page AD or refresh the page, the issue goes away. However, if I go to App Launcher again, then click on another App, then click back on App Launcher and click on my app again and click on the link to page E, I got the error again.
Page D and Page E are a simple visual force page, nothing fancy because was created for this test. The link is an anchor HTML tag.
<apex:page controller="Page_D_Controller" sidebar="false" >
  <!-- Begin Default Content REMOVE THIS -->
  <h1>VSF Page D - Final Page</h1>
  This is your new Page
  <!-- End Default Content REMOVE THIS -->
  <br />
  <a href="/apex/Page_E">Go to Page E</a>
</apex:page>
 
I recorded it.
http://nimb.ws/tkpfYi
 
This happen for my actual app and I created this app just o validate if this is a general error.
Do you have any idea on how I can avoid/fix this error?
Hi There,

We have a custom component in my Community Page and we are trying to get the Session Id or Access Token from the user who is logged in on Community Builder using Preview mode.

We have a code in place that works if the user is not in Preview Mode, basically we call an apex code and execute the UserInfo.getSessionId(), it returns the sessionid and I can do a rest call with this session ID. 
This SessionID works just when the user publishes a page and access it using the public URL. When I get the SessionID inside of Community Builder and click on Preview, and try to do a rest call with the session ID, it gives me an Invalid Session.

The link below is the link that I access my page and I can get the SessionId and do a rest call with no issue.
https://xxxdeveloper-edition.na50.force.com/CMSite/s/

The link below is when I am on Community Builder - Preview Mode, in this case I get the SessionID, but I cannot do a REST call.
https://xxxdev-ed--sitepreview.na50.force.com/CMSite/s/

said all that I have two questions.

1 - Why this Session Id in Preview mode is invalid, but the same code when I am using public link it works just fine?

2 - Is there another way to obtain the SessionId where I can do a Rest Call using Lightning component in Community Builder?

Please, let me know if you need any further information.
Thank you in advance.
Hi There,
I am using Lightning Experience, I created an App and I set Page D to be my first page when I access the App, there I have a link to Page E. If I log out and access SF again and click on App Launcher and click on my App, it loads the page D, but if I click on the link that I have in Page D that redirects to Page E, I got this error message in console:
 
Uncaught (in promise)
YB {component: "laf:appLayoutHost$controller$handlePageReferenceTransaction"....
"Action failed: laf:appLayoutHost$controller$handlePageReferenceTransaction [[LAF:AppLayoutHost:extractPageLevelReference] Expected app-level reference but got {"type":"standard__directCmpReference","attributes":{"name":"one:alohaPage","attributes":{"address":"https://xxx-dev-ed.lightning.force.com/apex/Page_E"}},"state":{}}]"
 
If I click on the Tab that I called Page AD or refresh the page, the issue goes away. However, if I go to App Launcher again, then click on another App, then click back on App Launcher and click on my app again and click on the link to page E, I got the error again.
Page D and Page E are a simple visual force page, nothing fancy because was created for this test. The link is an anchor HTML tag.
<apex:page controller="Page_D_Controller" sidebar="false" >
  <!-- Begin Default Content REMOVE THIS -->
  <h1>VSF Page D - Final Page</h1>
  This is your new Page
  <!-- End Default Content REMOVE THIS -->
  <br />
  <a href="/apex/Page_E">Go to Page E</a>
</apex:page>
 
I recorded it.
http://nimb.ws/tkpfYi
 
This happen for my actual app and I created this app just o validate if this is a general error.
Do you have any idea on how I can avoid/fix this error?
Hi There,

We have a custom component in my Community Page and we are trying to get the Session Id or Access Token from the user who is logged in on Community Builder using Preview mode.

We have a code in place that works if the user is not in Preview Mode, basically we call an apex code and execute the UserInfo.getSessionId(), it returns the sessionid and I can do a rest call with this session ID. 
This SessionID works just when the user publishes a page and access it using the public URL. When I get the SessionID inside of Community Builder and click on Preview, and try to do a rest call with the session ID, it gives me an Invalid Session.

The link below is the link that I access my page and I can get the SessionId and do a rest call with no issue.
https://xxxdeveloper-edition.na50.force.com/CMSite/s/

The link below is when I am on Community Builder - Preview Mode, in this case I get the SessionID, but I cannot do a REST call.
https://xxxdev-ed--sitepreview.na50.force.com/CMSite/s/

said all that I have two questions.

1 - Why this Session Id in Preview mode is invalid, but the same code when I am using public link it works just fine?

2 - Is there another way to obtain the SessionId where I can do a Rest Call using Lightning component in Community Builder?

Please, let me know if you need any further information.
Thank you in advance.

Hey folks,

 

I have some Visualforce pages in a managed package that I would like to expose to ALL users in an org (ALL meaning those with a license to my app and those who do not) and based on whether they have a license or not it will act differently.

 

At first glance I thought, hey cool they have a function for exactly that... I can call UserInfo.isCurrentUserLicensed('myApp') to find out and act accordingly.

 

Upon further thought, I realized that no code from the package can ever be run by unlicensed users in the first place, so there is no way to perform such a check... am I missing something?  Or is this method not able to be used from within a managed package?

 

You can use it in your own code to see if a user has a license to something else you've installed... or one partner app could use it to see if you have their competitors product installed (LOL) but nether of those seem all that helpful.  Any idea what this method is good for?

 

In case you are wondering, this is another thread that explains what I am trying to accomplish which lead me to wonder about this method:  http://boards.developerforce.com/t5/Visualforce-Development/Action-Override-to-Managed-VF-page-breaks-other-users/m-p/442317#M50598