Question

Get current user page

Hello, 

I am running into an issue where I need to know what page the current user is on. For instance if the user is on the ContactSectionV2 or if the user is on the OpportunityPageV2. Is this stored in any kind of variable, such as this.get() or Terrasoft.SysValue, or something of the sort.

Thanks!

Like 0

Like

2 comments
Best reply

Hi Tyler, 

 

In order to check the current user's page, you can try the following code:

var historyState = this.sandbox.publish("GetHistoryState");
var hash1 = historyState.hash.historyState;

After that, you can parse hash1 and get the current schema out of it. 

 

Regards, 

Anastasiia

Hi Tyler, 

 

In order to check the current user's page, you can try the following code:

var historyState = this.sandbox.publish("GetHistoryState");
var hash1 = historyState.hash.historyState;

After that, you can parse hash1 and get the current schema out of it. 

 

Regards, 

Anastasiia

Just what I needed, thanks!

Show all comments