• Bergin
  • NEWBIE
  • 60 Points
  • Member since 2013
  • Sr. Software Engineer
  • Verizon Media


  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 11
    Replies
We are using Single sign on to login to Salesforce. We'd like to make an API callout from Salesforce to an internal API. To authenticate to access the API, we'd like to use the session token from the single sign-on to send with the HttpRequest so that the service can validate that the request is coming from a reliable user from salesforce. How to get the user session token that the single sign-on provider sends using Apex?

Any guidance would be helpful. Thank you!
 
I am attempting to programmatically archive Attachments in Salesforce over to Google Drive. Google Drive API requires OAuth and I am having a little bit of trouble setting it up.

I was trying to avoid building and parsing HTTP Requests/Responses in order to get through the Authorization Flow but my attempts have failed.

First, I configured an API Project via the Google API ConsoleUser-added image

Second, I created an AuthProvider in Salesforce.
User-added image

At this point, I would expect the following code sample to grab an Access Token for me:
system.debug(Auth.AuthToken.getAccessToken('0SO4B000000CacK', 'Open ID Connect'));
However, I receive a null value.

For good measure, duplicated everything for a Google Auth Provider, instead of  Open Id Connect with the same result. I also set up an external data source (which does authenticate and sync) to make sure I had a token.

Has anyone been able to successfully use AuthToken methods when connecting to Google APIs?
Is there anything that I missed along the way?
 
I'm trying to complete the "Set Up Single Sign-On for Your Internal Users" Trailhead challenge, and was able to execute the description of the challenge successfully. However, I'm getting the following error when checking the challenge on Trailhead:
 
Challenge Not yet complete... here's what's wrong: 
Could not find SAML Enabled in your org's setup audit trail. Make sure that you have 'SAML Enabled' checked under 'Federated Single Sign-On Using SAML' in your org's 'Single Sign-On Settings'.

I've reviewed the settings, and "SAML Enabled" is true, and I'm connected to the right org when doing the challenge. Has anyone else encountered this?
Hello Community, 
I'm working on the "Setting up Lightning Connect - Pb with API Trailhead Module and after submitting the Check Challenge I've received this error below:

"Challenge Not yet complete... here's what's wrong:
There was an unexpected error in your org which is preventing this assessment check from completing: System.ExternalObjectException: data.api.DataSourceException: This data is no longer available. The "Phone" table in the external data source is currently unavailable. Try again later or contact your administrator for help."


Has anyone come across this error, or have any ideas on what the issue is or on how to proceed to complete the challenge. Thanks.
 
can anyone please tell me if itsw mandatory to deploy test class in production?
What's wrong in this code? 
I'm trying to add contact to a Business account.

public void AddContact(Account account, string firstName, string lastName)
    {
      Contact NewContact = new Contact();
     
      NewContact.FirstName = firstName;
      NewContact.LastName = lastName;
      NewContact.Account = account;
          
            System.debug('Before Insert Biz Contact123 : ' + firstName + ' - ' + lastName + ' - ' + account);
      //Insert new contact
      insert NewContact;

            System.debug('After Insert Biz Contact123 : ' + NewContact.FirstName + ' - ' + NewContact.LastName + ' - ' + NewContact.Account.Id);
    }

This is what I see in the log, but the account is not bound to the contact.

|USER_DEBUG|[143]|DEBUG|Before Insert Biz Contact123 : James - San - Account:{Name=Jaas, RecordTypeId=012Z0000000D69aIAC, Id=001Z000000k7IA7IAM}
|USER_DEBUG|[150]|DEBUG|After Insert Biz Contact123 : James - San - 001Z000000k7IA7IAM

Looks like I am missing the name attribute for outputLinks, but there is no such thing as name fot the tag.

 

Like you see in the code I tried "link.expressions.Value" too.

 

public Component.Apex.OutputPanel getLinks(){
		Component.Apex.OutputPanel pnl = new Component.Apex.OutputPanel();
		for(string id : recentItems) {
			
			Component.Apex.outputLink link = new Component.Apex.outputLink(value='/'+id, title=id);		
			//link.expressions.Value = '/{!id}';	This does not work either
			pnl.childComponents.add(link);	
		}
		return pnl;
    } 

 I see the links if I do inspect element, but they are not displayed on the page.

 

<span id="j_id0:j_id1:j_id6_0">
  <a href="https://na9.salesforce.com/001E000000iWHSLIA4" title="001E000000iWHSLIA4"></a>
  <a href="https://na9.salesforce.com/001E000000iWHSMIA4" title="001E000000iWHSMIA4"></a>
</span>

 

What am i missing here?

 

Thanks in advnace.

I have custom objects A and B. The relationship between A & B is set using a custom object C, with object A & B (master detail) as fields of C.

 

I have created a custom lookup page to bind object B (to A) which is set as related list to Object A.

I want to invoke the custom page when  I click on New button in the related list. How can I achieve this?

 

Thanks,

Hi,

I would like to ask if any expert know how to develop the Lookup button in the Visualforce Page. Thanks!

Best regards

 

When any user other than an administrator attempts to run a custom report the following error message appears.

"Report Obsolete

This report can no longer be edited or run. Your administrator has disabled all reports for the custom object, or its relationships have changed."

While logged in as the system adminstrator i am able to run the report, but when i log in as a Standard user and try to run the same custom report i get the message above.

Is there anyway to allow the Standard user permission to run custom reports?