• Sandeep Kumar Gond
  • NEWBIE
  • 0 Points
  • Member since 2021

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

I created a new custom field, added it to 4 page layouts and its permission was read/editable by all. When i moved this field from DEV to UAT using change set, only the new field was copied, it was not added in the page layouts and its permissions were not there as well, it was hidden from all profiles. What did I miss here??
Hi All,

I could use some guidance on how to properly parse my JSON into a custom object. I am able to get all of my deserialized results in the debug log, but I am not able to access individual variables to create a new object and populate the fields. I can get top level object results, but not individual member data like myMap.get('specificVariable');

Full code:
public class NPIcalloutHelper {
    
    public static String getDocById(Integer NPIid){
        
        Http http = new Http();
        HttpRequest request = new HttpRequest();
        request.setEndpoint('https://npiregistry.cms.hhs.gov/api/?number='+NPIid);
        request.setMethod('GET');
        HttpResponse response = http.send(request);
        String strResp = '';
        
           system.debug('******response '+response.getStatusCode());
           system.debug('******response '+response.getBody());
        
        // If the request is successful, parse the JSON response.
        if (response.getStatusCode() == 200) 
        {
            // Deserializes the JSON string into collections of primitive data types.
           Map<String, Object> npiResults = (Map<String, Object>) JSON.deserializeUntyped(response.getBody());
            // Cast the values in the 'results' key as a list
            List<Object> allresults =(List<Object>)npiResults.get('results');
            System.debug('allresults' + allresults );
                   }
        return strResp ;
   }

}