function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
NordbergNordberg 

Automatic Login via an external button

I am attempting to have my non-users of salesforce.com use the system without their knowing it.  I want to place a button or link on my company intranet and have that automatically log them into the system as a particular user and create a new custom object record.  When they click the save button I want the system to log them out of salesforce.com and send them back to the company intranet.

Can anyone give me some examples of how this would be done, and any code that would be necessary.

I really appreciate any help,

JD

DevAngelDevAngel
This should be pretty straight forward.  On your server use a particular, specifically created user that has the appropriate rights to create the record.  Then in (what are you using, PHP, .NET, Java, Rails, KPL?????) login and do what you need to do.

I would create your own form to collect the data for the record since they aren't users they won't know what to do.  Your post would use the API to create the record and on success you could navigate anywhere you want.  If you can't use the API, then you can't do this, period.


Cheers
NordbergNordberg

I want them to use the system, as three of the fields are lookup fields, but I would just rather them not go through the login and create new process.  I want them to push either a link or a button and it to log them in as a specific user and create this particular record.

I don't know coding very well so I don't really know where to start.  I was hoping for some examples or something.

Any more help is always appreciated.

JD

michaelforcemichaelforce
The high-level address you need to link to would look something like this...
 
 
more or less.  A few things to note here:
 
1.  I do not condone this as it is allowing multiple users to utilize one login... which I would imagine is against your contract with salesforce.com.
 
2.  Make sure this user / profile is set up to allow nothing more than creating this type of record... because once it's logged in, it's logged in.  Plus the username and password can be picked up by anyone who can see your browsing traffic.
ClaiborneClaiborne

Just a slight correction -

The login link is https://www.salesforce.com/login.jsp?pw=PASSWORD&un=USERNAME

If you use https. the password and user name are encrypted before being sent out over the internet.

Also, I agree with David Carroll in that you should not put the user into salesforce.com - too much of a security risk. Instead, create your own form pages and look-ups in your own code.

NordbergNordberg
Agreed,

I wasn't thinking this through properly.  Thanks