Lightning experience deep link to custom Visualforce tab - salesforce

Do you know if it is possible to deep link a custom tab on the left hand navigation?
In my web app I allow the user to login through SSO from Salesforce ( so I use salesforce as authentication provider ), than when the user credentials are ensured i redirect the user to the tab using an aspex url like the following:
https://{domain}/apex/{VisualforceTabsName}?sfdc.tabName={VisualforceTabsRef}
or a servlet integration link like the following:
https://na15.salesforce.com/servlet/servlet.Integration?lid={lid}&ic=1&linkToken={linkToken}
I got those links simply right clicking the tabs and copy the link, now this is not going to work on the new ligthening experience where the link is something like the following;
https://gs0.lightning.force.com/one/one.app?source=aloha#{token}
Now it seems to me that the token in this case is user specific, so it can't be used as high level reference to the Visualforce tab.
Do you know if there is a way to do the same in the Lightening Experience (Spring 16' release)? Or if there is a different way to achieve the same result?
Thanks

In Lightning Experience, you can reference custom tabs using the developer name of the tab (note that this is the API name of the tab containing the Visualforce page, not of the page itself). This URL should work:
{domain}/lightning/n/{tabName}
This assumes that you have already created a tab for your Visualforce page.

Related

Salesforce Lightning - how to set nooverride for Lightning, but retain override in Classic

We are planning to migrate our users from Classic to Lightning with a phased roll out. That means we need to retain all the behaviours of Classic and Lightning in parallel for a period of time.
That's working well, except for Button Overrides. There doesn't appear to be a way of configuring Lightning to use the standard edit behaviour, while Classic retains an edit form override. For classic the options available are No Override, Custom S-Control and Visual Force Page. However, the only options available for Lightning are Lightning Component or Use the Salesforce Classic override. There's no option for No Override.
We tried writing a custom Aura component to re-direct to the edit page with ?nooverride=1 but that doesn't work - the user is re-directed, but once the edit page is closed and saved, the user is left on a blank page, not re-directed back to the view of the edited page.
Does anyone have a workaround, or explanation as to why this seems not to be possible ?
whenever you specify a Url as a retURL parameter Salesforce will redirect to that url.
Now in Salesforce Classic view page means xxx.salesforce.com/IdOfRecordToView so You can try retURL parameter in URL with the value of Salesforce Record id which you are editing
example : xxx.salesforce.com/a010000000000qn/e?retURL=%2Fa010000000000qn&nooverride=1

How can I redirect unauthenticated Blazor Azure AD users to a different page than authenticated users?

I'm using the Blazor Server templates included with Visual Studio 2019.
In the template application that uses local authentication, When I view the page without being authenticated, the AuthorizeView tags work as expected, and the log in/out buttons on the navbar are displayed dynamically based on these tags. I am able to view the counter and weather forecast pages as a guest.
In the template application that uses Azure AD authentication, whenever I try and view a page without being authenticated, I'm redirected to the Microsoft login prompt. I'm still able to use the AuthorizeView tags to dynamically display components in the navbar, but what I want to be able to do is view the counter and weather forecast pages as a guest without getting redirected.
Is there any way to achieve this? Am I maybe missing something in App.razor?
Edit:
If I log out using the navbar link, and then navigate back with my browser, I can view the pages without authorization. But then when I refresh the page, I get sent back to https://login.microsoftonline.com/. What could be causing this? I want to view an unauthorized home page without getting redirected.
The behaviour you see is by design.
To change it you can make this change inside Startup.Configure :
services.AddControllersWithViews(options =>
{
var policy = new AuthorizationPolicyBuilder()
.RequireAuthenticatedUser()
.Build();
//options.Filters.Add(new AuthorizeFilter(policy));
});
(and of course reduce this code to just services.AddControllersWithViews(); when you want to keep it this way.)
With this change you will have to block private pages with #attribute [Authorize] or with <AuthorizeView> and there is no automatic redirect to the login page.

How to hide the Tabs in Hawtio? Also, how to stop the default landing on ActiveMQ after connecting to remote server?

I have 2 questions here:
1. How to hide unwanted Tabs in the Tab navigator of Hawtio?
There are other tabs on home page as well as Connection page of Hawtio. I want to remove few and keep only my custom tabs.
2. By default, after connecting to remote server, it lands on Active MQ page.
Here, I want it to land on my custom plugin html.
I know the URL which is being hit for landing on ActiveMQ page. But I want to figure out from where it is being hit. If not that, I want to find out how can I pass my own URL (for landing on custom Plugin html, which opens only when I click on the custom Tab.)
The changes need to be done at the code level.
Any help is appreciated.
Ad 1.
In the preference you can disable/enable plugins, and change the order they are listed.
Ad 2.
In the preference you can reorder the plugins so your custom plugin is listed first.

Having issues with fields/permissions in Salesforce Sites (Accounts Related)

Hey guys I really need help with setting up sites:
I have a visualforce page that I am setting up in sites and I have gone through the profile (guest sites user) and given them all the relevant access settings for the objects, visualforce pages & the apex classes.
My page render fine when I access it internally (through SALESFORCEURL/apex/page) but when I access it through the sites URL it has an issue rendering the fields.
Basically I have an account record which I prefil using an ID in the URL Parameter (this is all working and testing via the internal visualforce page). In the internal page it appears as a prefilled editable inputText box which I can edit and submit fine. In sites the fields appear as a non-editable outputLabel that of course I can not edit, and this is the entire purpose of my visualforce page.
Does anyone have a work around for this? Or at least a solid reason as to why it works in the internal visualforce page but not from sites?
Thanks

how to set visual force page as default in salesforce

I have a requirement that there is a user with particular profile and if he logs into the salesforce account, I want that he should be directly shifted to a visual force page. I tried to replace home tab with visual force page. But in profile this option is not editable. What I can do to accomplish this.
You could create a new "app". Apps are pretty much just sets of tabs (with exception of special stuff such as Service Cloud Console). In app you can define that there should be no home page, instead your visualforce (as a tab) would be added and marked as default landing page. Then you'd share this app with his profile and revoke access to other apps?
People can still add/remove tabs they wish to see in each app though so somebody might override your configuration.

Resources