• William212121
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies

Hello. I'm trying Single Sign-On for Force.com with OpenAM.


1st, I tried SSO with OpenAM for normal user account. It succeeded.

I was looking at http://wiki.developerforce.com/index.php/Single_Sign-On_with_SAML_on_Force.com.


2nd, I'm trying SSO with OpenAM for Customer Portal user, now.

I don't know how to setup the following attributes on OpenAM.


https://na11.salesforce.com/help/doc/en/salesforce_winter10_release_notes.pdf - pp172.

"In the SAML assertion, add the portal_id and organization_id as attributes."

 

Note that I know the values of portal_id and organization_id.

 

Could anyone help me? Thanks.

I'm having a problem sending e-mail from an APEX controller extension. Here's the code followed by the results from the debug log.

 

public class leadExtension {

public leadExtension(ApexPages.StandardController controller) {
this.lead = (Lead)controller.getRecord();

// Create a new single email message object
// that will send out a single email.
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();

// Strings to hold the email addresses to which you are sending the email.
String[] toAddresses = new String[] {'********@hsabank.com'};

// Assign the addresses for the To list to the mail object.
mail.setToAddresses(toAddresses);

// Specify the address used when the recipients reply to the email.
mail.setReplyTo('********@hsabank.com');

// Specify the name used as the display name.
mail.setSenderDisplayName('HSA Bank');

// Specify the subject line for your email address.
mail.setSubject('New Contact Request: ' + lead.FirstName);

// Set to True if you want to BCC yourself on the email.
mail.setBccSender(false);

// Optionally append the salesforce.com email signature to the email.
// The email address of the user executing the Apex Code will be used.
mail.setUseSignature(false);

// Specify the text content of the email.
mail.setPlainTextBody('Please add this new contact...');

mail.setHtmlBody('Please add this new contact...');

// Send the email you have created.
Messaging.sendEmail(new Messaging.SingleEmailMessage[] {mail});
}

private final Lead lead;
}
<apex:page tabStyle="Lead" standardController="Lead" extensions="leadExtension" >
    <apex:form >
    <apex:sectionHeader title="New Contact Request" />
    <h1>Notice Sent</h1>
    <p>
        Congratulations, your request to add a new Contact has been submitted. 
    </p>
    <apex:outputField title="First Name:" value="{!Lead.FirstName}"/>
    </apex:form>
</apex:page>
Element thePage called method {!checkManageability} returned type PageReference: none
***Begining Page Log for /apex/New_Contact_Request
20090801203603.582:Class.leadExtension.<init>: line 38, column 42: Single email queued for send (pending commit) : replyTo: ********@hsabank.com, subject: New Contact Request: Randy, senderDisplayName: HSA Bank, bccSender: false, saveAsActivity: true, useSignature: false, toAddresses: [********@hsabank.com], plainTextBody: Please add this new contact..., htmlBody: Please add this new contact...,
20090801203603.582:Class.leadExtension.<init>: line 39, column 9: Email result true
20090801203603.582:External entry point: returning from end of method public leadExtension<Constructor>(ApexPages.StandardController) in 38 ms
Cumulative profiling information:

No profiling information for SOQL operations.

No profiling information for SOSL operations.

No profiling information for DML operations.

1 most expensive method invocations:
Class.leadExtension: line 3, column 12: public leadExtension<Constructor>(ApexPages.StandardController): executed 1 time in 38 ms


***Ending Page Log for /apex/New_Contact_Request?id=00Q8000000SRUBJ&core.apexpages.devmode.url=1&scontrolCaching=1

 

I suppose I should first point out that I'm fairly new to Salesforce, and this is the first class I've tried to develop on my own. So, please be gentle with me! :smileywink: 

 

Based on what I can see, everything appears to be working fine, and the associated Visualforce page displays without error. The code is running inside leadExtension constructor. The problem is that the e-mail never arrives. I've got a couple different Developer Edition orgs, and I've tied this code in both. I get the same result.

 

I get other e-mails from Salesforce, like the security token re-set, e-mail change confirmation, etc. So, I know mail is getting through from them.

 

Also, I checked the Email Logs, and it doesn't appear to show any e-mails being sent at the time that I tried to send them.

 

So, I'm a little stumped. Can somebody point me in the right direction.

Message Edited by DRSnyder on 08-01-2009 02:08 PM
Message Edited by DRSnyder on 08-03-2009 11:15 AM

Hey I am implementing SSO Delegated and have worked through most of it, built the web service etc.. per the example.

 

Now when I perform the initial post it generates the page posts to

<Form action="https://www.salesforce.com/login.jsp" method="post" name="sfdc">

 

After that it just shows the  https://login.salesforce.com/ page with the user name and no password and no error message.

 

My web services is never called from the post. 

 

But If I key some junk into the password and press enter the web service is then called.  in fact if i adjust my web service to always return true. I can login with the junk password. 

 

How do you get SF to post back automatically to the web services with the token after the initial post?

 

Does anyone know it the documentation / example is correct or if SSO works?

 

 

 

 

 

 

 

 

User Name:

Password:

Caps Lock is ON!Caps Lock is ON! Remember User Name
 

User Name:

Password:

Caps Lock is ON!Caps Lock is ON! Remember User Name