• suyogya jain 6
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
  Map<String,Object> results = (Map<String,Object>)JSON.deserializeUntyped(response.getBody());
              
                list<object> attchlist;
                list<ContentVersion> CV = new list<ContentVersion>();
                list<ContentDocumentLink> CDLink = new list<ContentDocumentLink>();
                Set<Id> contentDocumentIds = new Set<Id>();
                Set<FileData> fileFromSAP = new Set<FileData>();
                
                for(Object mapa:results.values() ){
                    Map<String,Object> tempMap = (Map<String,Object>)mapa;
                    map<string,object> attc = (Map<String,Object>)tempMap.get('Attachment');
}

This exception is coming while running the code...someone please help
{
   "Record": [
     {
      "Unique_ID": "",
      "Type_Of_Cert_Profile": "",
      "Delivery": "",
      "Delivery_Item_No": "",
      "Split_Del_Item_Number": "",
      "Sales_Org": "",
      "Distribution_Channel": "",
      "Ship_To_Party": "",
      "Delivery_Date": "",
      "Posting_Date_Doc": "",
      "Material_No": "",
      "Ship_Point": "",
      "Mother_Batch_No": "",
      "Child_Batch_No": "",
      "Plant": "",
      "Referenced_Doc_No": "",
      "Vendor_Batch_Number": "",
      "Originating_Doc": "",
      "Purchase_Order": "",
      "Purchase_Order_Item": "",
      "Sales_Order": "",
      "Sales_Order_Item": "",
      "Creation_Date": "",
      "Creation_Time": "",
      "Sled": "",
      "Manufacturing_Date": "",
      "Error_Msg": "",
      "Attachment": [
         {
            "Name": "",
            "Content": "",
            "Type": ""
         },
         {
            "Name": "",
            "Content": "",
            "Type": ""
         }
      ]
   }
   ]
}