Reply
Super Contributor
TehNrd
Posts: 1,725

URL to view record if logged in, else portal login page

We want to have workflow that is sent to portal users with a link that reference the given record, "Click here to view something".

 

Ideally, if the user is already logged it it would take the user directly to the record, https://na3.salesforce.com/00650000009QXHC . The problem with this is that if a user is not logged in this URL will take the user to the normal login.salesforce.com page and they won't be able to login (I think).

 

If they aren't logged in they should be directed to the portal login that looks something like this: https://na3.salesforce.com/secur/login_portal.jsp?orgId=00D00000000hXqx&portalId=06050000000000x

 

Is this possible?

 

Thanks,

Jason

Super Contributor
TehNrd
Posts: 1,725

Re: URL to view record if logged in, else portal login page

[ Edited ]

Ron Hess (http://twitter.com/vnehess/status/10384857689) recommened something like this:

 

https://na3.salesforce.com/secur/login_portal.jsp?orgId=00D00000000hXqv&portalId=06050000000000e&startURL=/00650000009QXHC

 

but it doesn't seem to work. Even if user is logged in it sends them back to the login page.

Message Edited by TehNrd on 03-12-2010 10:57 AM
Trusted Contributor
weznolte
Posts: 498

Re: URL to view record if logged in, else portal login page

Hey

 

Just a stab in the dark, but I've had issues with those parameters being case sensitive before.. is there documentation that speaks of 'StartUrl'? I'd try some permutations..

 

Wes 

Salesforce Tips 'n Tricks ~ The Silver Lining
Want to master the Force.com Platform? You need the Salesforce Handbook.
Super Contributor
TehNrd
Posts: 1,725

Re: URL to view record if logged in, else portal login page

Lowercase startUrl sort of works, but it is still not the functionality I want. It takes the user to the login page (even if they are already logged in) and then once they login it will take them to the record.

 

What I would like the action to be is that if the user already has an active session they are taken straight to the URL without needing to login.