• Devashree Tidke 23
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 2
    Replies
I am trying to store integration response in JSON format in a custom object (CustomResponseObject__c) to improve the performance. When I retrieve the JSON string after deserialization it can be instance of List<customIntegrationWrapperClass> or CustomIntegrationErrorLog__c Object. How do I deserialize the JSON string not knowing the object type ? 
I am trying this :
List<Object> storedResponse = (List<Object>)JSON.deserializeUntyped(listCustomResponseObject[0].JSON__c);
if(storedResponse[0] instanceOf customIntegrationWrapperClass){
    System.debug('Integration Success !!!'); //This line is never printed :(
}

The following code works :
List<Object> lstObject = (List<customIntegrationWrapperClass>)JSON.deserialize(listCustomResponseObject[0].JSON__c, List<customIntegrationWrapperClass>.class);

Any pointers ?
Tooling API Vs Metadata API. 
I have a use case where we need to fetch all the standard and custom objects names, apex classes (apex classes body), standard/custom fields and custom fields metadata(read only/required/field type etc.) in a single API call using Java code. 
Is that possible with tooling API or I have to go with Metadata API ? If yes how, if no suggest API for above use case.
I am using lightning-record-edit-form to creat/update existing record. I want to show date and datetime type fields in short format to align with salesforce forms.

One option that we found is with date-style for input-field but we don't want to change the component here. We wan't to do it with lightning-input-field only.

Default date-style for lightning-input-field:
User-added image
Date-style on salesforce forms: 
User-added image
I am trying to change date style to short for lightning-input-input field. but could not find any option to do so.

Any assistance would be greatly appreciated.

Thank you

 
I am trying to store integration response in JSON format in a custom object (CustomResponseObject__c) to improve the performance. When I retrieve the JSON string after deserialization it can be instance of List<customIntegrationWrapperClass> or CustomIntegrationErrorLog__c Object. How do I deserialize the JSON string not knowing the object type ? 
I am trying this :
List<Object> storedResponse = (List<Object>)JSON.deserializeUntyped(listCustomResponseObject[0].JSON__c);
if(storedResponse[0] instanceOf customIntegrationWrapperClass){
    System.debug('Integration Success !!!'); //This line is never printed :(
}

The following code works :
List<Object> lstObject = (List<customIntegrationWrapperClass>)JSON.deserialize(listCustomResponseObject[0].JSON__c, List<customIntegrationWrapperClass>.class);

Any pointers ?