• LeWiz
  • NEWBIE
  • 0 Points
  • Member since 2011

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

I would like to store the results of a SOQL query to a Map. My hope is that once the FieldName and Value is mapped that I could create a function where I pass a field name and the method can return the value from the map (along with some other processing that is not important for this example)

 

Assume that only a single row is returned.

 

[Select field1, field2, field3 from someObject Where Id=:someID]

 

 

I wanted to understand the APEX web services a little more and I am trying to find some answers. I was hoping someone here could see if I am on the right track.

the example for APEX web services and callouts, http://wiki.developerforce.com/index.php/Apex_Web_Services_and_Callouts, shows an example of this but I wanted to ask a few questions about the callout functionality.

Could this senario take place?

1) Opportunity Trigger:  Write an after update or before update trigger on the opporntunity object that would call a APEX class

2) Opportunity APEX class - could be designed and coded to send the data from that updated record from the trigger to an external web service or callout

3) External web service could be a script that parses the data and then processes it (sticking it into a database, updating a spread sheet, etc...)


I wanted to know if I am understanding this correctly?


Thanks!!

~Mike