• random_dude
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 4
    Replies

I need to do something pretty simple: adding contacts to the existing salesforce contacts like so:

 

Contact[] allContacts = [select firstName, lastName, Email, Birthdate, description from contact];
Contact newContact = new Contact(firstName = 'AAA', lastName='BBB', email='A@A.com' etc..);
allContacts.add(newContact);
upsert allContacts;

 

Problem is that the fields  "firstName, lastName, Email, Birthdate, description" are not fixed.  They will change depending on who uses the application. 

 

Is there a way to use string variables instead of fieldnames to add a new contact?

 

Something along the lines of:

String field1 = 'first_name';

newContact.Fields[field1] = 'AAA';

Web service callout failed: Unable to parse callout response. Apex type not found for element http://some_url=Success

 

What does this error mean?

 

I used the Generate from WSDL in Setup-> App Setup -> Develop -> Apex classes

It created a class from my webservice.

 

Now im confused about what the next step is.  How can I call my webservice functions from custom button presses, for example?

 

 

I repeatedly get those kind of error messages when trying to parse a WSDL into Apex code:

Wondering if anyone knew what it can be about?  Or how to, at free cost, get more info about the bug.

 

 

Error: Internal error, please contact support with error id: #########-### (##########). Error message: Failed to generate Apex code from WSDL

 

 

I need to do something pretty simple: adding contacts to the existing salesforce contacts like so:

 

Contact[] allContacts = [select firstName, lastName, Email, Birthdate, description from contact];
Contact newContact = new Contact(firstName = 'AAA', lastName='BBB', email='A@A.com' etc..);
allContacts.add(newContact);
upsert allContacts;

 

Problem is that the fields  "firstName, lastName, Email, Birthdate, description" are not fixed.  They will change depending on who uses the application. 

 

Is there a way to use string variables instead of fieldnames to add a new contact?

 

Something along the lines of:

String field1 = 'first_name';

newContact.Fields[field1] = 'AAA';

Web service callout failed: Unable to parse callout response. Apex type not found for element http://some_url=Success

 

What does this error mean?

 

I used the Generate from WSDL in Setup-> App Setup -> Develop -> Apex classes

It created a class from my webservice.

 

Now im confused about what the next step is.  How can I call my webservice functions from custom button presses, for example?