• Mohan Palaniappan
  • NEWBIE
  • 20 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 4
    Questions
  • 1
    Replies
Is it possible to access the current session details of the user inside the Future Apex using Auth.SessionManagement.getCurrentSession()? I tried to access it, but it ended with below exception.

System.UnexpectedException: Current session unavailable
 
When we call an 'Cacheable' apex method using @wire property or method, the data is cached and will be returned without making server roundtrip call. We can use refreshApex method to get a fresh data if needed. If we call Apex imperatively, the document says that we can call Apex method again to get the refreshed data. If I call the Apex method second time and if it makes a server call, in what scenarios it will return the local cached data?

"When a component calls an Apex method imperatively, to refresh data, call the Apex method again."
We want to use Named credentials with per-user identity and JWT Token Exchange for API authentication from Salesforce to an external API. The user's email ($User.Email) or some other user info will be passed in the "Per User Subject". This will help the external service to identify the user accessing the functionality and apply some controls in their side.

We will be referring these named credentials from Apex code, so what will happen when we use this named credential from future or queueable apex that is triggered from a User context? Will it be able to still pick the correct $User details?
In order to provide more granular and controlled access to flows, all our flows are enabled with access setting of "Override default behavior and restrict access to enabled profiles or permission sets" and access to the flows will be provisioned only using Permission Sets (Permission Set -> Flow Access settings).

We have a requirement to display the list of flows the user has access to based on the permission sets assigned to them. How can we achieve this using SOQL or Apex?
Is it possible to access the current session details of the user inside the Future Apex using Auth.SessionManagement.getCurrentSession()? I tried to access it, but it ended with below exception.

System.UnexpectedException: Current session unavailable
 
I have created a Push Topic that is working as expected .

How do i move this to production sandbox.

I am sure there should be a way to move a Topic from one Sanbox to another without having to manually create in the new Sanbox