• Eric Bowden
  • NEWBIE
  • 120 Points
  • Member since 2012

  • Chatter
    Feed
  • 3
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 13
    Replies
I have a package that contains apex code using a named credential to access an external REST service. The code works fine in the dev org, but once packaged and deployed to a test (subscriber) org I'm getting a System.CalloutException with the following message:
 
The callout couldn't access the endpoint. You might not have the required permissions, or the named credential "My_Named_Credential" might not exist.

The named credential is not included in the package as the endpoint configuration needs to be different for each org, however I've created the named credential in the test (subscriber) org, exactly as I have it in the dev org. The documentation on the use of named credentials in Apex code within packages suggests that this should work fine:

<excerpt>
If you package Apex code that specifies a named credential as a callout endpoint, also add the named credential to that package or otherwise make sure that the subscriber organization has a valid named credential with the same name.
</excerpt>

Ref: http://www.salesforce.com/us/developer/docs/packagingGuide/Content/packaging_component_behavior.htm

My Apex code:

            // Setup the REST call
            Http http = new Http();
            String endpointURL = 'callout:My_Named_Credential'; // Named Credential
    
            // Establish the request
            HttpRequest reqData = new HttpRequest();
            reqData.setTimeout(20000);
            reqData.setEndpoint(endpointURL);
            reqData.setMethod('POST');

            // Attempt the API callout
            HTTPResponse res = http.send(reqData);

Has anyone been able to successfully get this working? Are there any work-arounds I need to be aware of?

Thanks in advance,
BW.
 

I've followed all of the documentation steps, starting from https://help.salesforce.com/apex/HTViewHelpDoc?id=admin_files_connect_overview.htm&language=en_US (https://help.salesforce.com/apex/HTViewHelpDoc?id=admin_files_connect_overview.htm&language=en_US) but when I test the authentication (either via my username>My Settings>Personal>Authentication (etc) or Setup>Develop>External Data Sources) the following happens:
1. I get redirected to the correct SharePoint site and asked if I want to trust CRM. I click 'Trust it'.
2. I get a SalesForce error

There was a problem with your authentication attempt. Please try again. If you continue to encounter problems, contact your administrator.

Is there any way I can debug this further? I've not been able to connect to SharePoint with the Online Mnaagement PowerShell plugin (as suggested). Are there any SalesForce logs I can check?

Any suggestions gladly appreciated.

I have successfully configured Files Connect for SharePoint Online many times, and it works well for browsing and sharing files via Chatter or in the Files tab.  Next, I'd like to configure the External Object created by my Files Connect data source with a Lookup relationship to an opportunity.  I'm intending for users to be able to view files which are related to an Opportunity as a related list, on the details page for an Opportunity.  Thus far, I've not been successful.  

Has anyone accomplished this?  It appears that Files Connect: SharePoint Online is ignoring the metadata fields that I added to my document library in SharePoint.

Initially, I performed the following steps:
- Added a text column to my SharePoint document library called OpportunityId.
- Added a Lookup Relationship to the items_Files_Connect external object in Salesforce, I specified the External Column Name as OpportunityId.
- I added a few documents to my document library in SharePoint and set the OpportunityId value equal to the 18 digit id for a test opportunity.
- I viewed my test Opportunity, but the items_Files_Connect related list is empty.

To debug, I performed the following:
- Added a Text column to my external list called OpportunityId and set the External Column Name as OpportunityId.
- Created a tab for the external object items_Files_Connect and navigated to that tab.
- Modified the view for items_Files_Connect to include the new OpportunityId text column.
- I found that the OpportunityId text column is always empty. 

My debug steps lead me to think that Files Connect is not reading additional fields from SharePoint and thus that is the reason that my initial attempt to create a lookup relationship did not succeed.

I saw in the release notes (http://releasenotes.docs.salesforce.com/en-us/summer15/release-notes/rn_chatter_files_connect_lookup.htm) that Lookup Relationships should be working, but "Files Connect: SharePoint Online" wasn't called out specificially.

Appreciate any tips or confirmation if others have been able to retrieve metadata when using "Files Connect: SharePoint Online" or if you've been able to establish a lookup relationship where the 18 digit object id was stored as a field in SharePoint.
I have created a Visualforce page which uses the File API, available beginning with IE 10.  By default, my Visualforce pages render in IE 7 compatibility mode, and in case, the File API is not available.  I can force the Visualforce page to render in IE 10 compatibility mode by using the following code in my controller extension:
Apexpages.currentPage().getHeaders().put('X-UA-Compatible', 'IE=10');

However, the Visualforce page ignores the X-UA-Compatible response header from the Visualforce page and continues to render in IE 7 compability mode when it is rendered as part of a layout page (presumably because it is iframed).  

I have considered adding a X-UA-Compatible metatag to the Visualforce page, but I cannot add the meta tag early enough in the <head>.  By default, the only option I have found for adding a meta tag adds it to the end of the <head>, after several scripts have been loaded, and I believe it is ignored.  Also, I'm not sure the meta tag would be honored even if I could add it early enough in the head (related discussion (http://stackoverflow.com/questions/18976213/main-web-page-in-standard-mode-iframe-in-compatibility-mode-any-issues)).

Has anyone else faced the issue of IE compability mode for a Visualforce page that is hosted in a page layout?  I need to be able to force compatibility mode of IE10 or greater.
 
The message "Content cannot be displayed: More than 20 connections opened to server" appears for a Visualforce page that is making one web request, using a Named Credential.  I've tried logging in as a different user, same result.  I have also confirmed that I'm making only one web request per render of the Visualforce page.

This Visualforce page and the associated web request has worked well for several days.  So, I'm fairly confident that the issue is not with coding of the calls.  I'm using Http and HttpRequest for the call in Apex.

Does anyone know the specific limit that I'm hitting?  It looks to me as though my connections are somehow hung open.

Any ideas for how I can understand this error message, the related limit, and suggested workarounds appreciated.
I'm looking to create a custom Visualforce page for a client who has just-in-time provisioning enabled.

My understanding is that just-in-time provisioning will activate, and create an account for users that do not already have an account, for access to any page in Salesforce, including a Visualforce page.

For this particular Visualforce page, my client would like for existing users to have access, but they do not want access for this Visualforce page to trigger automatic provisiong of a user account, if an account does not already exist.

Can the just-in-time provisioning feature be controlled per page?  For example, is there a URL query string parameter that I could use to block the just-in-time provisioning feature?

Originally thinking this could be a configuration question, I posted it to the success community (https://success.salesforce.com/answers?id=90630000000D4cV).  One reply suggests that it is not something that can be configured and directed me to post this as a question to the developer forum.
Does Chatter offer a javascript embed component?

To better describe:  The idea is to be able to embed the Chatter feed and features in an html page using only javascript.  As an example, Yammer includes an embed component allowing a few lines of code in html to render the feed (see the first code snippet at https://developer.yammer.com/connect/).  This kind of integration is very handy and easy to use, so I imagined the Chatter folks are probably working on something similar (and better!).

I have experimented with embedding the Salesforce One UI in an html page as an iframe.  With privacy policies relaxed, this worked pretty well in my very limited testing, but I wanted to see if there are plans for a component designed for this sort of embedding.

Anyone heard of plans for this?

Thanks,
Eric Bowden

My Salesforce environment is configured for Salesforce single sign-on, and I would like to render a Visualforce page within an existing application web page, external to Salesforce.

 

By adusting the clickjack protection settings, I can render a Visualforce page in an iframe on a page external to Salesforce, but only if the browser has already authenticated to Salesforce.  But if the user has not yet authenticated to Salesforce, the iframe render stops once it reaches login.salesforce.com because x-frame-options: deny tells the browser that the page may not be rendered in an iframe.  Specifically, login.salesforce.com returns x-frame-options:deny on the final call to login.salesforce.com, if you're familiar with the sequence of redirects used for SSO.  I can post a trace if that would help explain better.

 

It would be high value to be able to render visual force pages, and the associated single sign-on authentication, as an iframe.

 

Is this possible using a configuration setting or is there another workaround possible?  Is there any possibility that this may change in a future release?

 

Has anyone heard if there are plans to extend Canvas Apps (http://blogs.developerforce.com/developer-relations/2012/09/create-force-com-apps-anywhere-with-force-com-canvas.html)  for deeper integration into force.com or if there is a way to do this today?

 

I'm looking at building an integration by building and distributing Visual Force Components.  The idea is to provide a new UI feature which force.com developers can easily snap into Visual Force pages.  But, one limitation I encountered is with outbound web requests, limited to 3MB, among other limitations.  For this reason, I'm led to see if I can host my features outside of Salesforce and then integrate as a Canvas App or using a similar iframe approach.

 

Canvas Apps look very interesting because (assuming I understand correctly) they allow me to develop on my own platform and hosting provider and at the same time providing users with a single sign-on experience.  The limits I would encouter developing Canvas Apps are those which apply to web services, which I have found to be much more relaxed.

 

However, Canvas Apps appear to be limited to presenting as a link from the Chatter page.  It would be great if I could leverage the goodness of Canvas Apps from inside a custom component.  

 

I've also thought about spinning my own, using OAuth + iFrame approach.  I think this approach could do the trick but wanted to first see if others have tried using the Canvas Apps goodness in other places such as Visual Force pages and components.

Is there a Chatter API call I can use to retrieve the list of record types which may serve as the parent Record Summary for a feed item post?

 

The documentation states that the Type attribute for a Record Summary is the Type of record, such as CustomObject, ContentDocument

, and so on.

 

Some examples for Record Summary types that I've seen have been Account and Report.  I believe there are around 18 record types.

 

I'm looking to display a different icon in my application for each record type, so I'll need to know ahead of time the list of possible record types.

 

An even better option would be a Chatter API call I could execute which would give me the 16x16 icon associated with each type of record.

I've recently been receiving (503) Server Unavailable responses to Chatter API calls.

 

I suspect that I may be reaching the 200 call per user/hour limit, but would like to find a way to confirm.

 

Is there a place in the Salesforce UI where I can observe the number of Chatter API calls invoked per hour?  Or, is there an API method I can call?

 

The specifications (https://na1.salesforce.com/help/doc/en/remoteaccess_oauth_SAML_bearer_flow.htm) for the OAuth 2.0 SAML Bearer Assertion Flow state that the Subject of the assertion must match the Username of the desired Salesforce user.  This is working well for us, but soon we will need to be able to create an assertion which matches the Federation Id of the desired user.

 

Does the OAuth 2.0 SAML Bearer Assertion Flow support Federation Id?  If not, is there a workaround possible?

The message "Content cannot be displayed: More than 20 connections opened to server" appears for a Visualforce page that is making one web request, using a Named Credential.  I've tried logging in as a different user, same result.  I have also confirmed that I'm making only one web request per render of the Visualforce page.

This Visualforce page and the associated web request has worked well for several days.  So, I'm fairly confident that the issue is not with coding of the calls.  I'm using Http and HttpRequest for the call in Apex.

Does anyone know the specific limit that I'm hitting?  It looks to me as though my connections are somehow hung open.

Any ideas for how I can understand this error message, the related limit, and suggested workarounds appreciated.
Does Chatter offer a javascript embed component?

To better describe:  The idea is to be able to embed the Chatter feed and features in an html page using only javascript.  As an example, Yammer includes an embed component allowing a few lines of code in html to render the feed (see the first code snippet at https://developer.yammer.com/connect/).  This kind of integration is very handy and easy to use, so I imagined the Chatter folks are probably working on something similar (and better!).

I have experimented with embedding the Salesforce One UI in an html page as an iframe.  With privacy policies relaxed, this worked pretty well in my very limited testing, but I wanted to see if there are plans for a component designed for this sort of embedding.

Anyone heard of plans for this?

Thanks,
Eric Bowden
I have successfully configured Files Connect for SharePoint Online many times, and it works well for browsing and sharing files via Chatter or in the Files tab.  Next, I'd like to configure the External Object created by my Files Connect data source with a Lookup relationship to an opportunity.  I'm intending for users to be able to view files which are related to an Opportunity as a related list, on the details page for an Opportunity.  Thus far, I've not been successful.  

Has anyone accomplished this?  It appears that Files Connect: SharePoint Online is ignoring the metadata fields that I added to my document library in SharePoint.

Initially, I performed the following steps:
- Added a text column to my SharePoint document library called OpportunityId.
- Added a Lookup Relationship to the items_Files_Connect external object in Salesforce, I specified the External Column Name as OpportunityId.
- I added a few documents to my document library in SharePoint and set the OpportunityId value equal to the 18 digit id for a test opportunity.
- I viewed my test Opportunity, but the items_Files_Connect related list is empty.

To debug, I performed the following:
- Added a Text column to my external list called OpportunityId and set the External Column Name as OpportunityId.
- Created a tab for the external object items_Files_Connect and navigated to that tab.
- Modified the view for items_Files_Connect to include the new OpportunityId text column.
- I found that the OpportunityId text column is always empty. 

My debug steps lead me to think that Files Connect is not reading additional fields from SharePoint and thus that is the reason that my initial attempt to create a lookup relationship did not succeed.

I saw in the release notes (http://releasenotes.docs.salesforce.com/en-us/summer15/release-notes/rn_chatter_files_connect_lookup.htm) that Lookup Relationships should be working, but "Files Connect: SharePoint Online" wasn't called out specificially.

Appreciate any tips or confirmation if others have been able to retrieve metadata when using "Files Connect: SharePoint Online" or if you've been able to establish a lookup relationship where the 18 digit object id was stored as a field in SharePoint.
We are looking at using Onedrive to store very large files/documents. Is there a way using files connect, we can upload files into Onedrive from salesforce?

Thanks.
I have created a Visualforce page which uses the File API, available beginning with IE 10.  By default, my Visualforce pages render in IE 7 compatibility mode, and in case, the File API is not available.  I can force the Visualforce page to render in IE 10 compatibility mode by using the following code in my controller extension:
Apexpages.currentPage().getHeaders().put('X-UA-Compatible', 'IE=10');

However, the Visualforce page ignores the X-UA-Compatible response header from the Visualforce page and continues to render in IE 7 compability mode when it is rendered as part of a layout page (presumably because it is iframed).  

I have considered adding a X-UA-Compatible metatag to the Visualforce page, but I cannot add the meta tag early enough in the <head>.  By default, the only option I have found for adding a meta tag adds it to the end of the <head>, after several scripts have been loaded, and I believe it is ignored.  Also, I'm not sure the meta tag would be honored even if I could add it early enough in the head (related discussion (http://stackoverflow.com/questions/18976213/main-web-page-in-standard-mode-iframe-in-compatibility-mode-any-issues)).

Has anyone else faced the issue of IE compability mode for a Visualforce page that is hosted in a page layout?  I need to be able to force compatibility mode of IE10 or greater.
 
I have a package that contains apex code using a named credential to access an external REST service. The code works fine in the dev org, but once packaged and deployed to a test (subscriber) org I'm getting a System.CalloutException with the following message:
 
The callout couldn't access the endpoint. You might not have the required permissions, or the named credential "My_Named_Credential" might not exist.

The named credential is not included in the package as the endpoint configuration needs to be different for each org, however I've created the named credential in the test (subscriber) org, exactly as I have it in the dev org. The documentation on the use of named credentials in Apex code within packages suggests that this should work fine:

<excerpt>
If you package Apex code that specifies a named credential as a callout endpoint, also add the named credential to that package or otherwise make sure that the subscriber organization has a valid named credential with the same name.
</excerpt>

Ref: http://www.salesforce.com/us/developer/docs/packagingGuide/Content/packaging_component_behavior.htm

My Apex code:

            // Setup the REST call
            Http http = new Http();
            String endpointURL = 'callout:My_Named_Credential'; // Named Credential
    
            // Establish the request
            HttpRequest reqData = new HttpRequest();
            reqData.setTimeout(20000);
            reqData.setEndpoint(endpointURL);
            reqData.setMethod('POST');

            // Attempt the API callout
            HTTPResponse res = http.send(reqData);

Has anyone been able to successfully get this working? Are there any work-arounds I need to be aware of?

Thanks in advance,
BW.
 
The message "Content cannot be displayed: More than 20 connections opened to server" appears for a Visualforce page that is making one web request, using a Named Credential.  I've tried logging in as a different user, same result.  I have also confirmed that I'm making only one web request per render of the Visualforce page.

This Visualforce page and the associated web request has worked well for several days.  So, I'm fairly confident that the issue is not with coding of the calls.  I'm using Http and HttpRequest for the call in Apex.

Does anyone know the specific limit that I'm hitting?  It looks to me as though my connections are somehow hung open.

Any ideas for how I can understand this error message, the related limit, and suggested workarounds appreciated.
Hi

I need to create a document set in sharepoint online from salesforce after creating a new account record, how to achieve this.

I have gone through the Files connect and lightning connect both are having only the read the columns and files from sharepoint but the write operation from salesforce to sharepoint is not possible.

Is there any other way to create/update a sharepoint custom column from salesforce

Thanks
Dinesh

I've followed all of the documentation steps, starting from https://help.salesforce.com/apex/HTViewHelpDoc?id=admin_files_connect_overview.htm&language=en_US (https://help.salesforce.com/apex/HTViewHelpDoc?id=admin_files_connect_overview.htm&language=en_US) but when I test the authentication (either via my username>My Settings>Personal>Authentication (etc) or Setup>Develop>External Data Sources) the following happens:
1. I get redirected to the correct SharePoint site and asked if I want to trust CRM. I click 'Trust it'.
2. I get a SalesForce error

There was a problem with your authentication attempt. Please try again. If you continue to encounter problems, contact your administrator.

Is there any way I can debug this further? I've not been able to connect to SharePoint with the Online Mnaagement PowerShell plugin (as suggested). Are there any SalesForce logs I can check?

Any suggestions gladly appreciated.

My Salesforce environment is configured for Salesforce single sign-on, and I would like to render a Visualforce page within an existing application web page, external to Salesforce.

 

By adusting the clickjack protection settings, I can render a Visualforce page in an iframe on a page external to Salesforce, but only if the browser has already authenticated to Salesforce.  But if the user has not yet authenticated to Salesforce, the iframe render stops once it reaches login.salesforce.com because x-frame-options: deny tells the browser that the page may not be rendered in an iframe.  Specifically, login.salesforce.com returns x-frame-options:deny on the final call to login.salesforce.com, if you're familiar with the sequence of redirects used for SSO.  I can post a trace if that would help explain better.

 

It would be high value to be able to render visual force pages, and the associated single sign-on authentication, as an iframe.

 

Is this possible using a configuration setting or is there another workaround possible?  Is there any possibility that this may change in a future release?

 

Has anyone heard if there are plans to extend Canvas Apps (http://blogs.developerforce.com/developer-relations/2012/09/create-force-com-apps-anywhere-with-force-com-canvas.html)  for deeper integration into force.com or if there is a way to do this today?

 

I'm looking at building an integration by building and distributing Visual Force Components.  The idea is to provide a new UI feature which force.com developers can easily snap into Visual Force pages.  But, one limitation I encountered is with outbound web requests, limited to 3MB, among other limitations.  For this reason, I'm led to see if I can host my features outside of Salesforce and then integrate as a Canvas App or using a similar iframe approach.

 

Canvas Apps look very interesting because (assuming I understand correctly) they allow me to develop on my own platform and hosting provider and at the same time providing users with a single sign-on experience.  The limits I would encouter developing Canvas Apps are those which apply to web services, which I have found to be much more relaxed.

 

However, Canvas Apps appear to be limited to presenting as a link from the Chatter page.  It would be great if I could leverage the goodness of Canvas Apps from inside a custom component.  

 

I've also thought about spinning my own, using OAuth + iFrame approach.  I think this approach could do the trick but wanted to first see if others have tried using the Canvas Apps goodness in other places such as Visual Force pages and components.

Is there a Chatter API call I can use to retrieve the list of record types which may serve as the parent Record Summary for a feed item post?

 

The documentation states that the Type attribute for a Record Summary is the Type of record, such as CustomObject, ContentDocument

, and so on.

 

Some examples for Record Summary types that I've seen have been Account and Report.  I believe there are around 18 record types.

 

I'm looking to display a different icon in my application for each record type, so I'll need to know ahead of time the list of possible record types.

 

An even better option would be a Chatter API call I could execute which would give me the 16x16 icon associated with each type of record.

experts

request for auth token and fails

i am using a webservice request to trigger an auth request. the call back is handled by a different method in the same webservice.

firewall? trusted remote site?

 

webservice call trigger: https://localhost:8443/auth_example/beginauth

HttpPost("https://cs2.salesforce.com/services/oauth2/token");//domain of sandbox

 

"client_id", "XXX"
"client_secret", "YYY"
"grant_type", "authorization_code"
"response_type", "code"

"redirect_uri", "https://localhost:8443/auth_example/auth/authcallback"//redirecturi is registered as remote site call back

 

what's am i missing?

 

thnaks