• Virendra Shekhawat
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
I have a method which creates Map<String,Object> by querying a object. I need to pass this value to a future method which has callout. Since callout method does not accept Sobject type as parameter, i need to convert this Map<String,Object> to Map<String,String>. 

Appreciate any insights on this issue

List<SObject> listObjectRecords = database.query('select ' + cusFields + ' from '+ objName + ' WHERE ID = \'' + objId + '\'');
 for(SObject sObj : listForMap) {
Map<String,Object> mapObj = (Map<String,Object>)Json.deserializeUntyped(Json.serialize(sObj));
}