• Tom Masci
  • NEWBIE
  • 0 Points
  • Member since 2014


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

Dears

 

Please could you help me to get the correct code to the below  issue? I need to take the value of the field name or address and save into a string value, after that these strings I will send via XML to external server.

 

Account a = [SELECT Name FROM Account WHERE Name = 'Foo' LIMIT 1];
String s = a.Name;// I can save it, but when I run the application I get another error.
String c = Account.Name;//second option I get the error "Illegal assignment from Schema.SObjectField to String".
  • April 21, 2010
  • Like
  • 0