• aditya
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
I am trying to send email messages using Partner wsdl file but getting exception saying that SObject.set_any() doesnot exist in SObject class.
Please sujest any solution or technique to send email messages using Partner wsdl.

Code used is like:
Code:
SObject[] mail = new SObject[1];
   MessageElement[] singleMessage = new MessageElement[8]; 
   singleMessage[0] = newMessageElement("BccAddresses",new String[] {"abc@abc.com", "abc@abc.com" });
   singleMessage[1] = newMessageElement("EmailPriority","EmailPriority.High");
   singleMessage[2] = newMessageElement("ReplyTo","abc@abc.com");
   singleMessage[3] = newMessageElement("SaveAsActivity","true");
   singleMessage[4] = newMessageElement("Subject","Lallan Testing 123");
   singleMessage[5] = newMessageElement("UseSignature","true");
   singleMessage[6] = newMessageElement("PlainTextBody","lallan testing 123.....lallan testing 123");
   singleMessage[7] = newMessageElement("ToAddresses",new String[] {"abc@abc.com"});
   mail[0] = new SObject(); 
   mail[0].setType("SingleEmailMessage"); 
   mail[0].set_any(singleMessage); 

 

Message Edited by aditya on 04-24-2007 05:53 AM

  • April 24, 2007
  • Like
  • 0
I am trying to send email messages using Partner wsdl file but getting exception saying that SObject.set_any() doesnot exist in SObject class.
Please sujest any solution or technique to send email messages using Partner wsdl.

Code used is like:
Code:
SObject[] mail = new SObject[1];
   MessageElement[] singleMessage = new MessageElement[8]; 
   singleMessage[0] = newMessageElement("BccAddresses",new String[] {"abc@abc.com", "abc@abc.com" });
   singleMessage[1] = newMessageElement("EmailPriority","EmailPriority.High");
   singleMessage[2] = newMessageElement("ReplyTo","abc@abc.com");
   singleMessage[3] = newMessageElement("SaveAsActivity","true");
   singleMessage[4] = newMessageElement("Subject","Lallan Testing 123");
   singleMessage[5] = newMessageElement("UseSignature","true");
   singleMessage[6] = newMessageElement("PlainTextBody","lallan testing 123.....lallan testing 123");
   singleMessage[7] = newMessageElement("ToAddresses",new String[] {"abc@abc.com"});
   mail[0] = new SObject(); 
   mail[0].setType("SingleEmailMessage"); 
   mail[0].set_any(singleMessage); 

 

Message Edited by aditya on 04-24-2007 05:53 AM

  • April 24, 2007
  • Like
  • 0