• gowda
  • NEWBIE
  • 0 Points
  • Member since 2004

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 22
    Replies

I need to create Opportunities in Salesforce.com from my client application,

first i need to get all the opportunities existing in salesforce.com for my account , then by comparing some value , if it's not exist i need to create an opportunity there

Let me know if any one knows about this

  • September 16, 2004
  • Like
  • 0

Folks

I have the following code,To create an Account  I compare our Account Number(our Database) against the Account Number present in the SalesForce, If it is equal , I need to updated the exiting Account Details in SalesForce , If its not equal , I need to create an Account in the SalesForce with that Account Number ,

Below is the code for that, for the testing purpose i am just passing some dummy Account Number compare against the same in Salesforce, If its equal i don't do anything now(currently) , but if its not equal i am creating an Account ,

The problem is that its creating multiple Accounts with the same Account Number , I think there is some problem in the LOOP , I was not able to figure out what was it..But if any one could figure out the problem that would be really great..

 

accountQuery = bindingStub
     .query("select Name,AccountNumber,Account_Id__c from Account");

sObjects = new SObject [1];
  Account sfAcct = new Account();
  Account account = new Account();

if (accountQuery.isDone()) {
   // Iterate through the records and process them
   for (int i = 0; i < accountQuery.getRecords().length; i++) {
    sfAcct = (Account)accountQuery.getRecords(i);
    acctNumber = sfAcct.getAccountNumber();
    acctId = sfAcct.getAccount_Id__c();

    System.out.println("Account Number & Account Id are = :"
      + acctNumber + "::" + acctId);
    
                if(acctNumber != null ) {
                 if(!(acctNumber.equals(acctNo))){
              System.out.println("inside IF LOOP");
     //create an account in salesforce
              account.setAccountNumber(acctNo);
              account.setAccount_Id__c(testId);
              account.setName("McDonalds");
     sObjects[0] = account;

     try {
      System.out.println("creating objects");
      saveResults = bindingStub.create(sObjects);
     } catch (UnexpectedErrorFault e1) {
      e1.printStackTrace();
     } catch (InvalidSObjectFault e1) {
      e1.printStackTrace();
     } catch (RemoteException e1) {
      e1.printStackTrace();
     }

    } else {
     // do update on the existing info in salesforce

    }
   }
  }

  • September 14, 2004
  • Like
  • 0

Folks

I have the following code to create an Account in Salesforce.com, I have created an new custom field called Account Id in Account Object...

1) Logs in Successfull - No problem

2) Querying for the fields in Account Object - No problem

    accountQuery = bindingStub
                  .query("select Id,AccountNumber,Account_Id__c from Account");

sObjects = new SObject[1];

if (accountQuery.isDone()) {
   // Iterate through the records and process them
   for (int i = 0; i < accountQuery.getRecords().length; i++) {
    Account acct = (Account) accountQuery.getRecords(i);
    String acctNumber = acct.getAccountNumber();
    String webSite = acct.getWebsite(); // just for testing...
    String acctId = acct.getAccount_Id__c();

Actually testId is hardcoded...i just want to test if i can able to create an account..I check testId against the acctId(custom field in Account Object) , If its equals i just update the Account Info or Create an New Account, Here in My case it is going in to the ELSE loop ...but when i logged in to my Developer Edition ,I don't see any accounts with Name= Norvergence..

if (testId == acctId) {
     System.out.println("inside IF LOOP");
     // do update on the existing info in salesforce
    } else {
     // create an account in salesforce
     acct.setAccount_Id__c(testId);
     acct.setName("Norvergence");
     sObjects[0] = acct;

     try {
      System.out.println("creating objects");
      saveResults = bindingStub.create(sObjects);
     } catch (UnexpectedErrorFault e1) {
      e1.printStackTrace();
     } catch (InvalidSObjectFault e1) {

      e1.printStackTrace();
     } catch (RemoteException e1) {

      e1.printStackTrace();
     }

Please let me know if i am doing any mistake in calling the right method..

 

  • September 14, 2004
  • Like
  • 0

I have a client application where in i pull all the Accounts from our Database and create an Account in the Salesforce.com...How do i go about this

How do i maintain all the primary keys at both the ends, i.,e SalesForce.com and our Database...

  • September 07, 2004
  • Like
  • 0
Will there be any major difference between the fields of the objects in Developer Edition when compared to the Enterprise Edition, Infact i see an id field is missing in Developer Edition which is there in Enterprise Edition
  • September 01, 2004
  • Like
  • 0

Hi All

I am trying to pull all the Contacts from my client application which i created after i signed up for the developer edition,

I should use binding.getUpdated(param1,param2,param3), Or is there any method which i have to use to get all the Contact Lists(Old + New)

regards

gowda

  • September 01, 2004
  • Like
  • 0

I go online log into my developer edition and create a New Lead ,

Now in my client application i need to pull all the New Leads,

Which method i should use to find out all the New Objects like Accounts, Leads etc...

I appreciate any help on this.

regards

gowda

 

  • August 31, 2004
  • Like
  • 0

Hi All

I just wanted to know what is the Unique Identifier among all the objects like Accounts,Lead,Contacts etc.

I appreciate if you could let me know about this that would be really helpful

regards

gowda

  • August 31, 2004
  • Like
  • 0

Hi All

I have developed a client application where i have all the login logic but i got the below server url from the LoginResult object

https://na1-api.salesforce.com/services/Soap/c/4.0

If i try to copy the above URL in the browser it gives out the below message;-

AXIS error

No service is available at this URL

 

I appreciate if any one could let me know about this that would be really helpful

regards

Gowda

  • August 30, 2004
  • Like
  • 0

folks

I created an developer account, then generated WSDL file and placed this WSDL file in my local environment and generated stubs based on this , Now I wrote an client which takes in the username and password , the same which i use to log in to the developer edition, Here is the code

 try{
            binding = (SoapBindingStub)
            new SforceServiceLocator().getSoap();
          }catch(Exception ex){
           System.out.println("exception occurred" + ex.toString());
          }
          System.out.println("binding :" + binding);
          binding.setTimeout(60000);
          
           loginResult = binding.login(uName,pwd);
           System.out.println("loginResult =" + loginResult.getServerUrl());

 

when i try to get the Server URL i am getting

https://na1-api.salesforce.com/services/Soap/c/4.0 which is correct by the standards then,

           binding._setProperty(SoapBindingStub.ENDPOINT_ADDRESS_PROPERTY,
                                                                                              loginResult.getServerUrl());
           
           _SessionHeader sh = new _SessionHeader();
           sh.setSessionId(loginResult.getSessionId());

// now i am trying to get the objects ..

         DescribeGlobalResult globalObjects = binding.describeGlobal();
           if (! (globalObjects == null)) {
               // Get the array of object names from the result
            String[] types = globalObjects.getTypes();
              if (!(types == null)){
              for (int i = 0; i < types.length; i++) {
                   System.out.println("Objects supported ::" + (types[i]));

              }

        }

but i am not able to print the objects,

I appreciate if any one knows how to get the objects that would be really greatful...

thanks & regards

gnanesh

 

 

 

  • August 30, 2004
  • Like
  • 0

Folks

I am developing a SOAP client (Java)for sforce.com services, Do i need to execute the Login logic each time(if the session is not expired) with the Sforce Web Services to access the other objects like Accounts,Leads,Contacts,

Please let me know about this,

Regards

gowda

  • August 25, 2004
  • Like
  • 0

Folks

I signed up for free Developer Edition account, After i logged in, Default it takes the Home page where i can see my tasks list, Below is the Task List,

My Tasks 
 
Complete Date  Subject  Contact/Lead  Related To 
X  Download your IDE toolkit  
X  Download your IDE toolkit 

If i click on the Download your IDE toolkit it takes me to the Detail about this task, I appreciate if any one help me out how to download this IDE toolkit that would be really helpful,

Thanks & Regards

Gnanesh

 

  • August 24, 2004
  • Like
  • 0

Folks

I have the following code,To create an Account  I compare our Account Number(our Database) against the Account Number present in the SalesForce, If it is equal , I need to updated the exiting Account Details in SalesForce , If its not equal , I need to create an Account in the SalesForce with that Account Number ,

Below is the code for that, for the testing purpose i am just passing some dummy Account Number compare against the same in Salesforce, If its equal i don't do anything now(currently) , but if its not equal i am creating an Account ,

The problem is that its creating multiple Accounts with the same Account Number , I think there is some problem in the LOOP , I was not able to figure out what was it..But if any one could figure out the problem that would be really great..

 

accountQuery = bindingStub
     .query("select Name,AccountNumber,Account_Id__c from Account");

sObjects = new SObject [1];
  Account sfAcct = new Account();
  Account account = new Account();

if (accountQuery.isDone()) {
   // Iterate through the records and process them
   for (int i = 0; i < accountQuery.getRecords().length; i++) {
    sfAcct = (Account)accountQuery.getRecords(i);
    acctNumber = sfAcct.getAccountNumber();
    acctId = sfAcct.getAccount_Id__c();

    System.out.println("Account Number & Account Id are = :"
      + acctNumber + "::" + acctId);
    
                if(acctNumber != null ) {
                 if(!(acctNumber.equals(acctNo))){
              System.out.println("inside IF LOOP");
     //create an account in salesforce
              account.setAccountNumber(acctNo);
              account.setAccount_Id__c(testId);
              account.setName("McDonalds");
     sObjects[0] = account;

     try {
      System.out.println("creating objects");
      saveResults = bindingStub.create(sObjects);
     } catch (UnexpectedErrorFault e1) {
      e1.printStackTrace();
     } catch (InvalidSObjectFault e1) {
      e1.printStackTrace();
     } catch (RemoteException e1) {
      e1.printStackTrace();
     }

    } else {
     // do update on the existing info in salesforce

    }
   }
  }

  • September 14, 2004
  • Like
  • 0

Folks

I have the following code to create an Account in Salesforce.com, I have created an new custom field called Account Id in Account Object...

1) Logs in Successfull - No problem

2) Querying for the fields in Account Object - No problem

    accountQuery = bindingStub
                  .query("select Id,AccountNumber,Account_Id__c from Account");

sObjects = new SObject[1];

if (accountQuery.isDone()) {
   // Iterate through the records and process them
   for (int i = 0; i < accountQuery.getRecords().length; i++) {
    Account acct = (Account) accountQuery.getRecords(i);
    String acctNumber = acct.getAccountNumber();
    String webSite = acct.getWebsite(); // just for testing...
    String acctId = acct.getAccount_Id__c();

Actually testId is hardcoded...i just want to test if i can able to create an account..I check testId against the acctId(custom field in Account Object) , If its equals i just update the Account Info or Create an New Account, Here in My case it is going in to the ELSE loop ...but when i logged in to my Developer Edition ,I don't see any accounts with Name= Norvergence..

if (testId == acctId) {
     System.out.println("inside IF LOOP");
     // do update on the existing info in salesforce
    } else {
     // create an account in salesforce
     acct.setAccount_Id__c(testId);
     acct.setName("Norvergence");
     sObjects[0] = acct;

     try {
      System.out.println("creating objects");
      saveResults = bindingStub.create(sObjects);
     } catch (UnexpectedErrorFault e1) {
      e1.printStackTrace();
     } catch (InvalidSObjectFault e1) {

      e1.printStackTrace();
     } catch (RemoteException e1) {

      e1.printStackTrace();
     }

Please let me know if i am doing any mistake in calling the right method..

 

  • September 14, 2004
  • Like
  • 0
I want to make sure that I fully understand this functionality. The API takes a Calendar instance for start and end dates for the GetUpdated and GetDeleted messages. The documentation explicitly talks about the time portions of the start and end dates, it specifies that the minutes are ignored, but it doesn't explicitly say anything about the date portion of these parameters. Is the date portion used as well such that I could get updates from a date range and not just a time range?

The reason I ask this is because I have code that makes some updates on Day1. I have code that checks for updates that have occurred since the beginning of Day1 but it returns no IDs. This happens some specified time period after the updates occur (from 15 minutes up to one day later). Is there a synchronization process that I should wait on? Are creates/updates/deletes via the API not immediately accessible by the getUpdated/getDeleted portion of the API?

Thanks.
Will there be any major difference between the fields of the objects in Developer Edition when compared to the Enterprise Edition, Infact i see an id field is missing in Developer Edition which is there in Enterprise Edition
  • September 01, 2004
  • Like
  • 0

Hi All

I am trying to pull all the Contacts from my client application which i created after i signed up for the developer edition,

I should use binding.getUpdated(param1,param2,param3), Or is there any method which i have to use to get all the Contact Lists(Old + New)

regards

gowda

  • September 01, 2004
  • Like
  • 0

I go online log into my developer edition and create a New Lead ,

Now in my client application i need to pull all the New Leads,

Which method i should use to find out all the New Objects like Accounts, Leads etc...

I appreciate any help on this.

regards

gowda

 

  • August 31, 2004
  • Like
  • 0

Hi All

I just wanted to know what is the Unique Identifier among all the objects like Accounts,Lead,Contacts etc.

I appreciate if you could let me know about this that would be really helpful

regards

gowda

  • August 31, 2004
  • Like
  • 0

Hi All

I have developed a client application where i have all the login logic but i got the below server url from the LoginResult object

https://na1-api.salesforce.com/services/Soap/c/4.0

If i try to copy the above URL in the browser it gives out the below message;-

AXIS error

No service is available at this URL

 

I appreciate if any one could let me know about this that would be really helpful

regards

Gowda

  • August 30, 2004
  • Like
  • 0

folks

I created an developer account, then generated WSDL file and placed this WSDL file in my local environment and generated stubs based on this , Now I wrote an client which takes in the username and password , the same which i use to log in to the developer edition, Here is the code

 try{
            binding = (SoapBindingStub)
            new SforceServiceLocator().getSoap();
          }catch(Exception ex){
           System.out.println("exception occurred" + ex.toString());
          }
          System.out.println("binding :" + binding);
          binding.setTimeout(60000);
          
           loginResult = binding.login(uName,pwd);
           System.out.println("loginResult =" + loginResult.getServerUrl());

 

when i try to get the Server URL i am getting

https://na1-api.salesforce.com/services/Soap/c/4.0 which is correct by the standards then,

           binding._setProperty(SoapBindingStub.ENDPOINT_ADDRESS_PROPERTY,
                                                                                              loginResult.getServerUrl());
           
           _SessionHeader sh = new _SessionHeader();
           sh.setSessionId(loginResult.getSessionId());

// now i am trying to get the objects ..

         DescribeGlobalResult globalObjects = binding.describeGlobal();
           if (! (globalObjects == null)) {
               // Get the array of object names from the result
            String[] types = globalObjects.getTypes();
              if (!(types == null)){
              for (int i = 0; i < types.length; i++) {
                   System.out.println("Objects supported ::" + (types[i]));

              }

        }

but i am not able to print the objects,

I appreciate if any one knows how to get the objects that would be really greatful...

thanks & regards

gnanesh

 

 

 

  • August 30, 2004
  • Like
  • 0