• MingChang.Hou
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 2
    Replies
I try to use the query function as follow ...
 
                SForceOfficeToolkitLib3.QueryResultSet3 qrs;
                qrs = g_sfApi.Query("Select Id from account where Name = 'test'", false);  
                //where g_sfApi is SForceOfficeToolKitLib3.SForceSession3()
 
                SForceOfficeToolkitLib3.SObject3 qr;
                qr = qrs;    --------> this will be fail .... "It can't transfer SForceOfficeToolkitLib3.QueryResultSet3 type to SForceOfficeToolkitLib3.SObject3"
 
I dump the qrs value, I got the follow information.
    qrs.EntityType = "account";
    qrs.Error = NO_SF_ERROR;
    qrs.ErrorMessage = null
    qrs.Size = 1;
    qrs.Tag = null;
 
Has any method that I could get the query result?
 
I'm using vs .net 2005 to program.
 
hello,
 
I'm using  vs .net 2005 to develop a client AP.
 
I want to support the salesforce professional edition users can through my client ap to connector the SF database.
 
but I go a problem when I follow the document and try it...
 
my code is like the follow:
 
namespace XSforceOfficeToolkit
{
    public class XSForceOffTk
    {
        public SForceOfficeToolkitLib3.SForceSession3 g_sfApi = null;       
        public void ShowErrMessage(string m_errMsg)
        {
            System.Windows.Forms.MessageBox.Show(m_errMsg);
        }
        public bool Login(string name, string pwd)
        {
            Console.WriteLine("XSForceOffTk :: Init() Enter");
            bool bLogin = false;
            g_sfApi = new SForceOfficeToolkitLib3.SForceSession3();
            bLogin = g_sfApi.Login(name, pwd);
            if(bLogin == true){
                ShowErrMessage("Login Success !");
            }else{               
                //ShowErrMessage("Login Fail !");
                ShowErrMessage(g_sfApi.ErrorMessage);
                ShowErrMessage(g_sfApi.ServerUrl);
            }
            Console.WriteLine("XSForceOffTk :: Init() Exit");
            return bLogin;
        }
    }
}
 
the fail message is :
1. API is not enabled for this Organization or Partner.
 
does anyone know where's wrong...thanks for your help~~~~
 
 
 

I try to call the sforce API  "sendMail" but meet some error!

The code is like as follow :

            sforce.SendEmailResult[] ser = null;
            sforce.Email[] m_mails = new sforce.Email[1];
            sforce.Email m_mail = new sforce.Email();
            m_mail.senderDisplayName = "AAA";
            m_mail.subject = "Test Salesforce sendMail";
            m_mail.replyTo = "a@a.a.a";
            m_mail.saveAsActivity = true;
            m_mail.emailPriority = EmailPriority.Highest;
            m_mail.useSignature = true;
            m_mails[0] = m_mail;

            ser = binding.sendMail(m_mails); -----> running to this has the error occur

 

error message:

            Must specify a {http://www.w3.org/2001/XMLSchema-instance}type attribute value for the {urn:partner.soap.sforce.com}

            messages element.

 

            My develop tool is using  visual studio 2005 and the project creates by C sharp.

 

 

Thanks for your help~~~

 

 

 

 

 

 

I get the enterprise.wsdl file form the Salesforce websit, and then I use vs2005 create a new project(ASP.NET XML Web Service).
I follow the help file(download form salesforce) "Step3. Import the WSDL File Into Your Development Platform" as follow :
 
1. Add a Web reference to your project for the XML Web service that you want to access. The Web reference creates a proxy
class with methods that serve as proxies for each exposed method of the XML Web service.
2. Add the namespace for the Web reference.
3. Create an instance of the proxy class and then access the methods of that class as you would the methods of any other class.
To add a Web reference:
1. On the Project menu, choose Add Web Reference.
2. In the URL box of the Add Web Reference dialog box, type the URL to obtain the service description of the XML Web
service you want to access, such as:
file:///c:\WSDLFiles\enterprise.wsdl
3. Click Go to retrieve information about the XML Web service.
4. In the Web reference name box, rename the Web reference to sforce, which is the namespace you will use for this Web
reference.
5. Click Add Reference to add a Web reference for the target XML Web service. For more information, see the topic “Adding
and Removing Web References” in the Visual Studio documentation.
6. Visual Studio retrieves the service description and generates a proxy class to interface between your application and the
XML Web service.
 
But finish the import step, the vs2005 will auto generate sforce.h and generate error message as follow:
1. error C2143: syntax error : miss ';' (before 'System::String')
        public:  property System::String^  namespace {    -----> this line
            System::String^  get();
            System::Void set(System::String^  value);
        }
 
Does anyone know how to solve this problem?
 
thanks for your help!
 
 
 
 
 
I try to use the query function as follow ...
 
                SForceOfficeToolkitLib3.QueryResultSet3 qrs;
                qrs = g_sfApi.Query("Select Id from account where Name = 'test'", false);  
                //where g_sfApi is SForceOfficeToolKitLib3.SForceSession3()
 
                SForceOfficeToolkitLib3.SObject3 qr;
                qr = qrs;    --------> this will be fail .... "It can't transfer SForceOfficeToolkitLib3.QueryResultSet3 type to SForceOfficeToolkitLib3.SObject3"
 
I dump the qrs value, I got the follow information.
    qrs.EntityType = "account";
    qrs.Error = NO_SF_ERROR;
    qrs.ErrorMessage = null
    qrs.Size = 1;
    qrs.Tag = null;
 
Has any method that I could get the query result?
 
I'm using vs .net 2005 to program.
 
hello,
 
I'm using  vs .net 2005 to develop a client AP.
 
I want to support the salesforce professional edition users can through my client ap to connector the SF database.
 
but I go a problem when I follow the document and try it...
 
my code is like the follow:
 
namespace XSforceOfficeToolkit
{
    public class XSForceOffTk
    {
        public SForceOfficeToolkitLib3.SForceSession3 g_sfApi = null;       
        public void ShowErrMessage(string m_errMsg)
        {
            System.Windows.Forms.MessageBox.Show(m_errMsg);
        }
        public bool Login(string name, string pwd)
        {
            Console.WriteLine("XSForceOffTk :: Init() Enter");
            bool bLogin = false;
            g_sfApi = new SForceOfficeToolkitLib3.SForceSession3();
            bLogin = g_sfApi.Login(name, pwd);
            if(bLogin == true){
                ShowErrMessage("Login Success !");
            }else{               
                //ShowErrMessage("Login Fail !");
                ShowErrMessage(g_sfApi.ErrorMessage);
                ShowErrMessage(g_sfApi.ServerUrl);
            }
            Console.WriteLine("XSForceOffTk :: Init() Exit");
            return bLogin;
        }
    }
}
 
the fail message is :
1. API is not enabled for this Organization or Partner.
 
does anyone know where's wrong...thanks for your help~~~~