• Ashwin Sidharth
  • NEWBIE
  • 0 Points
  • Member since 2013

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

Hi,

 

I am trying to integrate SalesForce with Office 365. I am facing some issues trying to get the data from Sharepoint directly from SalesForce. I am using Apex classes to perform REST calls to Office365. But somehow I get the error saying "Arithmetic operation resulted in an overflow."

 

Below are my steps to fetch data from SP2013

 

1. Call (POST method) the STS service "/extSTS.srf" to get the BinarySecurityToken 

2.  Using the BinarySecurityToken get the two cookies FedAuth and rtFA; url used to perform Http POST "_forms/default.aspx?wa=wsignin1.0"

3.  Set the cookies in the header and query Sharepoint using REST _api/web/lists/GetByTitle(\'ListName\')/items 

 

Has anyone come across similar issue?  Is there any better way to integrate (apart from using 3rd party software). Let me know if you require more details or things are not clear.

 

Cheers,

Ashwin

ashwin_v_s@hotmail.com

 

 

 

 

Hi,

 

I am trying to download attachments from Salesforce to upload it to Sharepoint. The issue I am facing is that, the download works fine with attachments like .txt file etc, but for Word or Excel documents gives an error when trying to open the document "the document cannot be opened because there are problems with the contents". 

 

I am doing this via c# REST api. 

 

//example of word doc retrieval
string bodyData = HttpGet(token.instance_url + "/services/data/v28.0/sobjects/Attachment/00Pi0000001UMXa/Body", "");
byte[] encData_byte = System.Text.Encoding.UTF8.GetBytes(bodyData);
File.WriteAllBytes(@"c:\yourfile.docx", encData_byte);

 

From SF documents I understood that the string returned by querying the attachment is Base64Encoded. So in the code you need to ConvertFromBase64. But when I tried to convert the string using Convert.ToBase64String, it always gave an error saying "System.FormatException : Invalid character"

 

Have anyone faced something similar?

 

Cheers,

Ashwin

 

Hi ,

 

I am quite new to Saleforce. I did quite a bit of search in the community but could not find what i was looking for.

 

We have the following requirement - need to create a .net based application that will pull data records ( Contacts , Products , Feedback etc) / information from the salesforce env and export it to another system. The data volume might be quite large as we have a lot of instances or per country data. Expected volume for some of the countries will cross 300000. 

 

Initially we decided to use the Apex Api Soap service calls to retrieve the information. But we found that there is a limit in terms of the number of records that are retrieved per service request.i.e only 1000 records are returned per call, and we will need to make subsequent calls to get this remaning information. Worst part is that there is also a hard limit on the number of calls made (10000 per day). Can anyone suggest the best approach to get this done?  

 

Cheers,

Ashwin

 

 

Hi,

 

I am trying to integrate SalesForce with Office 365. I am facing some issues trying to get the data from Sharepoint directly from SalesForce. I am using Apex classes to perform REST calls to Office365. But somehow I get the error saying "Arithmetic operation resulted in an overflow."

 

Below are my steps to fetch data from SP2013

 

1. Call (POST method) the STS service "/extSTS.srf" to get the BinarySecurityToken 

2.  Using the BinarySecurityToken get the two cookies FedAuth and rtFA; url used to perform Http POST "_forms/default.aspx?wa=wsignin1.0"

3.  Set the cookies in the header and query Sharepoint using REST _api/web/lists/GetByTitle(\'ListName\')/items 

 

Has anyone come across similar issue?  Is there any better way to integrate (apart from using 3rd party software). Let me know if you require more details or things are not clear.

 

Cheers,

Ashwin

ashwin_v_s@hotmail.com

 

 

 

 

Hi,

 

I am trying to download attachments from Salesforce to upload it to Sharepoint. The issue I am facing is that, the download works fine with attachments like .txt file etc, but for Word or Excel documents gives an error when trying to open the document "the document cannot be opened because there are problems with the contents". 

 

I am doing this via c# REST api. 

 

//example of word doc retrieval
string bodyData = HttpGet(token.instance_url + "/services/data/v28.0/sobjects/Attachment/00Pi0000001UMXa/Body", "");
byte[] encData_byte = System.Text.Encoding.UTF8.GetBytes(bodyData);
File.WriteAllBytes(@"c:\yourfile.docx", encData_byte);

 

From SF documents I understood that the string returned by querying the attachment is Base64Encoded. So in the code you need to ConvertFromBase64. But when I tried to convert the string using Convert.ToBase64String, it always gave an error saying "System.FormatException : Invalid character"

 

Have anyone faced something similar?

 

Cheers,

Ashwin

 

Hi ,

 

I am quite new to Saleforce. I did quite a bit of search in the community but could not find what i was looking for.

 

We have the following requirement - need to create a .net based application that will pull data records ( Contacts , Products , Feedback etc) / information from the salesforce env and export it to another system. The data volume might be quite large as we have a lot of instances or per country data. Expected volume for some of the countries will cross 300000. 

 

Initially we decided to use the Apex Api Soap service calls to retrieve the information. But we found that there is a limit in terms of the number of records that are retrieved per service request.i.e only 1000 records are returned per call, and we will need to make subsequent calls to get this remaning information. Worst part is that there is also a hard limit on the number of calls made (10000 per day). Can anyone suggest the best approach to get this done?  

 

Cheers,

Ashwin

 

 

Hi everybody,

Recently I have a requirement to search sharepoint document on SalesForce.com. So I tried to use SharePoint default web service. I have generated an apex class from SharePoint Lists.asmx. However in the methods that got generated, I couldn't find any credentials passing methods (such as: setUserName(), setPassword() etc..)

If I just call the method then a 401 unauthorized message is sent back. Is there anyway to pass credentials to SharePoint web service call ?

I'm using SharePoint server 2010 and SalesForce Developer edition.

Thanks and best regards

Can anyone please post a simple example of calling the dws webservice for creating a folder in sharepoint through its web services?

 

In addition, an example for user/password along with it would be really nice.

 

Please help me! Thanx in advance. 

  • September 22, 2009
  • Like
  • 0