• 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 have clients that access Salesforce API to write data and read data using the salesforce standard APIs. How do monitor the traffic, logs for these API calls? I'm also looking for ways to know the traffic by username or clientId
  • September 24, 2019
  • Like
  • 0
I have a incoming API call from an external system that uses Mutual TLS. I want to verify if the cert that comes in the incoming call to Salesforce is from the right client that has access to our instance.
ie, to verifiy the cert coming has a specific common name that we have authorized.

Is there a way to do this verification in Salesforce?
When mutual TLS is enforced for incoming API calls, how to ensure the client certificate is valid that is a known CN?

I don't want to let any client SSL cert to be allowed to access the API.
When getting the access token from /services/oauth2/token, we pass the client_id, secret, username, password as parameters. Is there a way to pass it via header?
  • April 12, 2018
  • Like
  • 0
So we use after insert trigger on "LogoutEventStream" for some actions on logout. 
My question is about, how to write tests for this? How do we call the insert record on LogoutEventStream?
Here's the link to the actual trigger https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_logouteventstream.htm
  • February 25, 2018
  • Like
  • 0
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!
 
  • December 06, 2017
  • Like
  • 0
I need to call an external API from Salesforce. I have 3 different sandboxes (Dev, QA, Training) that point to the same external QA API endpoint.
  • Is it possible to create a single CA signed certificate and use it across my 3 sandboxes?
  • Should I create an individual certificate for each of the sandboxes?
  • My domain for dev sandbox would be mycompany--dev.cs7.my.salesforce.com as of now when I get the certificate signed. What will happen if Salesforce switches my sandboxes from one instance to another later on (example CS7 to CS20)?
Please suggest/share your experience.

Thank you.
  • August 15, 2017
  • Like
  • 0
I have a visual force page that gets data from a webservice through Apex callout. I want to display that in  the Account page in a section.
The page works fine if I access the page independently, it shows the below error if I embed the visualforce page in the Account Page Layout.

Content cannot be displayed: Web service callout failed: Unexpected element. Parser was expecting element 'http://schemas.xmlsoap.org/soap/envelope/:Envelope' but found 'http://www.w3.org/1999/xhtml:html'

Anybody else faced this issue? What could be the fix?

  • April 23, 2014
  • Like
  • 0
I have a requirement to get data from SQL server and show the result in a tabular format in a visual force page. The user will select one relevant customer from the search result to add to "Account". I've got the search results page done and the new visualforce page to insert the customer data. (Had few other requirements so added a custom page).

What is the best way to get the data from selected row and pass on to the new page?
I have about 12 fields like name, address, dob etc. Phone & email will be manual entry in the visual force page.

Any code samples will be highly appreciated and helpful.
Thanks for your help in advance.
  • March 20, 2014
  • Like
  • 0
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

  • March 17, 2014
  • Like
  • 0
I'm in need of a calculator to show the page load time or the response time when I click on a case or contact name or a visualforce page.
Is there a tool / app / plugin available ?

I'm using service cloud console, so not able to find the acual load time any browser plugins when I navigate within the console.
  • February 12, 2014
  • Like
  • 0

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,

  • August 09, 2013
  • Like
  • 0
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!
 
  • December 06, 2017
  • Like
  • 0
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

  • March 17, 2014
  • Like
  • 0

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,

  • August 09, 2013
  • Like
  • 0

Hi,

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

Best regards

 

  • February 26, 2009
  • Like
  • 0

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?

  • August 02, 2005
  • Like
  • 0