• AmandaByrnePBO
  • NEWBIE
  • 0 Points
  • Member since 2016
  • Customer Advocate
  • Click & Pledge


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 9
    Replies
I've created an aura component for a community/Experience page that displays a form for record creation with the recordEditForm descriptor, successfully creates the record with onSubmit and onSuccess handlers, but I'd like the component to return the values with a recordViewForm descriptor.  
 
<aura:component implements="forceCommunity:availableForAllPageTypes,forceCommunity:themeLayout,force:hasRecordId,force:lightningQuickAction" access="global" >
    
    <aura:attribute name="recordId" type="String" />
   
    
    <!-- Begin Form Block -->
		<lightning:recordEditForm aura:id="customContactSupportForm" 
                                  objectApiName="Case"
                                  onsubmit="{!c.handleOnSubmit}"
                                  onsuccess="{!c.handleOnSuccess}"
                                  onerror="{!c.handleOnError}">

        	<p class="slds-p-horizontal_medium">
            	                <lightning:inputField fieldName="SuppliedName" required="true" />
				<lightning:inputField fieldName="Subject" />
  
            	</p>
    	<lightning:button label="Submit" 
                              class="customContactSupportButton"
                              variant="brand"
                              type="submit" />
        </lightning:recordEditForm>
        <!-- End Form Block -->
        
        
        <!-- Begin Confirmation Block -->
        
        <lightning: recordViewForm class="slds-hide" aura:id="customContactSupportForm_Success" objectApiName="Case">

            
<p class="slds-p-horizontal_medium">
<lightning:outputFieldfieldName="CaseNumber" />
<lightning:outputField fieldName="SuppliedName" />
<lightning:outputField fieldName="Subject" />
            </p>
            
        </lightning:recordViewForm>
        
        <!-- End Confirmation Block -->
    </div>
When the form is submitted, the handleOnSuccess creates the record, establishes the new recordId, and uses a helper to show the 'recordViewForm', but I can't figure out how to get recordViewForm to use the new recordId.

how can I get recordViewForm to use the new recordId?



 
We did a complimentary install for a customer, but they claim not to have received the email detailing that the install failed.  Where else can I look to get details as to why the installation failed?
First of all, not a programmer - just a Dev-min Admin that enjoys learning and likes a challenge, but I could use a little direction.

I have a Community Site page that uses managed components to load Knowledge Articles.  A javascript file called 'topArticleListFor Topic' pulls the value I need from the component:
 
(function s() {
    return (function evaledScript() {
        $A.componentService.addComponentClass("markup://forceCommunity:topArticleListForTopic", function() {
            return {
                meta: {
                    name: "forceCommunity$topArticleListForTopic",
                    "extends": "markup://aura:component",
                    imports: {
                        lib: "markup://siteforce:quarterbackLibrary"
                    }
                },
                controller: {
                    init: function(a, b, c) {
                        a.set("v.totalSize", a.get("v.articles").length);
                        a.find("articleList").set("v.items", a.get("v.articles").slice(0, a.get("v.maxArticlesShown")));
                        c.setViewMore(a)
                    },
                    navigateToTopic: function(a, b, c) {
                        c.navigateToTopic(a)
                    }
                },
                helper: {
                    navigateToTopic: function(a) {
                        var b = $A.getEvt("markup://forceTopic:navigateToTopic");
                        b.setParams({
                            topicId: a.get("v.topicId"),
                            topicName: a.get("v.title"),
                            options: {
                                selectedTab: "articles"
                            }
                        });
                        b.fire()
                    }

Specifically, I'm trying to get the value of the topicId.

The returned HTML, which would seem to serve as an example for displaying the result displays the aura variable title (aka: topicName).

I think I have all I need to call the topicId, just not sure how to call it. I don't mind doing some legwork to figure it out, just need to be pointed in the right direction.

Thanks so much, Amanda







 
I'm using an Apex plugin in a flow. The Apex Class implements Process.Plugin to collect inputs of the URI, Auth Token, and object requested, makes an HTTP GET callout, and returns the json results for the object. I finally got the test returning the right outputs from my mock class and passes the tests easy breezy. But when I use it in the flow,  the Debug says  I'm getting a run-time 'Invalid conversion from runtime type List to Map '.

There's a Process.PluginResult method that does most of the action, a doGet() method that does the Http callout, deserializes the Json, returns the results to the PluginResult method, and the Process.Plugin Describe method that defines the inputs for the flow.  Now in the process of trying to make this work- I did make the doGet() method invocable- which required nested List results.  The doGet method returns a list of lists (Key List and Values List), and then I map them back together once the results have returned to the PluginResult method.

Is stitching the list back together in the Result method breaking my flow? Will my Http callout work if it returns a map instead of a List of Lists?
Or do I need to somehow control which method's results are returning at runtime?

 
Really stuck on this one.

Wanted to create an Apex Plugin for a Flow that could accept parameters to make an Http Get request.  

I have 3 classes - the base HttpGetPlugin class, the HttpGetPlugin_Test class, and the HttpGetPlugin_Mock class.
I found I needed to use an Invocable Method in order to pass the parameter for the request as HttpGet methods do not accept parameters, which overcomplicated things - and now I'm stuck on a "List index out of bounds". I've tried adding some list size verifications, but they've never seemed to help.  Grateful for any assistance.
 
@RestResource(urlmapping='/HttpGetPlugin')
global class HttpGetPlugin implements Process.Plugin {
        
	// The main method to be implemented. The Flow calls this at runtime.
	global Process.PluginResult invoke(Process.PluginRequest request) { 
        // Get the variables from the flow
        String GetURL = (String) request.inputParameters.get('GetURL');
        System.debug('GetURL = ' + GetURL);
        
        // Create List to hold Http Get parameters b/c @HttpGet methods won't take params- @Invokable methods can- but they can only take one (type List only)!  Grrrr!
        List<String> HttpGetReq = new List<String>();
        	HttpGetReq.set(0,GetURL);
      	System.debug('HttpGetReq = ' + HttpGetReq);
        
        if(HttpGetReq.size() > 0) {
    		doGet(HttpGetReq);
        }

        // return to Flow
        Map<String,String> result = new Map<String,String>();
        return new Process.PluginResult(result);
    
    }
    
    @InvocableMethod(label='Http GET Request')
    global static List<String> doGet(List<String> HttpGetReq) { 

        // Instantiate a new http object
         Http h = new Http();

        // Instantiate a new HTTP Get request
         HttpRequest req = new HttpRequest();
        if(HttpGetReq.size() > 0) {
         req.setEndpoint(HttpGetReq.get(0));
        } else { System.debug('Endpoint is null');}    
         req.setMethod('GET');
         req.setHeader('Content-Type', 'application/json;charset=UTF-8');
  
        // Send the request, and return a response
        HttpResponse res = h.send(req);
        List<String> HttpGetRes = new List<String>();
        if (res.getStatusCode() == 200) {
            // Deserializes the JSON string into String
            String getResult = (String) JSON.deserializeUntyped(res.getBody());
            if(getResult != null) {
            	HttpGetRes.set(0,getResult);
            }
        }
        return HttpGetRes;
    }
        
    global Process.PluginDescribeResult describe() {
        Process.PluginDescribeResult result = new Process.PluginDescribeResult(); 
        result.Name = 'HTTP GET Plugin';
        result.inputParameters = new List<Process.PluginDescribeResult.InputParameter> { 
               new Process.PluginDescribeResult.InputParameter('GetURL','Enter URL to make GET Request.', Process.PluginDescribeResult.ParameterType.STRING, true)
            };
        result.outputParameters = new List<Process.PluginDescribeResult.OutputParameter> { 
               new Process.PluginDescribeResult.OutputParameter('HttpResponseString','The parsed JSON response from the Http GET Request', Process.PluginDescribeResult.ParameterType.STRING)
            };        
        return result; 
    } 

}
 
@isTest
public class HttpGetPlugin_Test{
   
   static testMethod void test_PluginRequest_UseCase1(){
       HttpGetPlugin obj01 = new HttpGetPlugin();
       Map<String, Object> inputParams = new Map<String, Object>();
       	inputParams.put('GetURL', 'https://api.somewebsite.com/animals');
   
    Process.PluginRequest request = new Process.PluginRequest(inputParams);
    obj01.invoke(request);
    Process.PluginDescribeResult result = obj01.describe();      
  }
    
    @isTest public static void testGetCallout(){
        List<String> actualGetRequest = new List<String>();
        	actualgetRequest.add(0,'https://api.somewebsite.com/animals');
        
        Test.setMock(HttpCalloutMock.class, new HttpGetPlugin_Mock());        
        
        Test.startTest();
            HttpGetPlugin.doGet(actualGetRequest);    
        Test.stopTest();  
                    
       // Verify that the response received contains fake values
       	List<String> actualGetResponse = HttpGetPlugin.doGet(actualGetRequest);
        System.debug(actualGetResponse);
        List<String> expectedGetResponse = new List<String>();
        	expectedGetResponse.set(0,'');
       	System.assertEquals(actualGetResponse, expectedGetResponse);
    }
    
    static testMethod void test_describe_UseCase1(){
        HttpGetPlugin obj01 = new HttpGetPlugin();
        obj01.describe();
  }
}
 
@isTest global class HttpGetPlugin_Mock implements HttpCalloutMock {
    global static HttpResponse respond(HttpRequest request) {
        HttpResponse HttpGetResponse = new HttpResponse();
        HttpGetResponse.setHeader('contentType', 'application/json');
        HttpGetResponse.setBody('{"id":2,"name":"hungry hippo","diet":"marbles","color":"purple"}');
        HttpGetResponse.setStatusCode(200);
        return HttpGetResponse;
    }
}

 
I have several questions regarding the Apex REST Callouts Challenge.

1. In many of the posted examples I have seen where people are receiving similar errors to mine, the endpoint is:
request.setEndpoint('https://th-apex-http-callout.herokuapp.com/animals/' + id);
I'm used to working with URL parameters passed as "/?id=001".  Why is this different?

2.  I'm continuing to have problems getting my code to test without a Type mismatch error.  In my AnimalLocatorMock class, I passed the response as 
animalsResponse.setBody('{"animals": [{"id":1,"name":"pesky porcupine"},{"id":2,"name":"hungry hippo"},{"id":3,"name":"squeaky squirrel"}]}');
but in other examples, I see test data as
response.setBody('{"animal":{"id":1,"name":"chicken","eats":"chicken food","says":"cluck cluck"}}');
where the mock data seems to reflect the result of a single record - which would make sense, if I'm passing a specific id, the 'get' request is forming the query, right? 

The error I get is "Invalid conversion from runtime type List<ANY> to Map <String, Any>"; however, in my code, I am not defining anything as a "List".  Is this because I have set my test example response to reflect multiple records, instead of a single record defined by Id?  Is Apex seeing that the same key is getting used, and thus defining my collection as a List instead of a String? Is this why I get the type mismatch?

3. I am not super clear on what "MAP" is doing, even after reading the Apex documentation- I've seen examples of "Map <String, Object>", "Map <String, String>", and "Map (String, Object)". Am I defining the data types that my collection will become when I assign variables in my method? What is the difference between using syntax of "<>" vs "()"?

4. I see a lot of reference to using "JSON2Apex Tool" to parse the JSON for advanced JSON strings.  I have had the most minimal interaction with Heroku, and the link presented in the Trail is to a web tool.  If I'm creating a class that will operate independently on its own, I don't really see how I'm supposed to use that.

Is the "JSON2Apex Tool" something that inherently comes with a Salesforce instance, or is it something I add to my instance and call from my class?

AND the tutorial refers to the "built-in JSONParser class", but if I look at my Classes from Settings > Develop > Apex Classes, I do not see a JSONParser class listed.  What is meant by "built-in"?


For Reference, my full code:
public class AnimalLocator { 
    public static String getAnimalNameById(Integer id) {        
        String animalName;
        Http http = new Http();
        HttpRequest request = new HttpRequest();
        request.setEndpoint('https://th-apex-http-callout.herokuapp.com/animals/' + id);
        request.setMethod('GET');
        HttpResponse animalsResponse = http.send(request);

        if (animalsResponse.getStatusCode() == 200) {
            Map<String, Object> results = (Map<String, Object>) JSON.deserializeUntyped(animalsResponse.getBody());
            System.debug('Converted JSON results: ' + results);
	        Map<String, Object> animalDetails = (Map<String, Object>) results.get('animals');
            System.debug('animalDetails: ' + animalDetails);

            animalName = (String) animalDetails.get('name');
            System.debug('Animal Name:' + animalName);
            }
        return animalName;
        }
    }
 
@isTest global class AnimalLocatorMock implements HttpCalloutMock {
    global HttpResponse respond(HttpRequest request) {
        HttpResponse animalsResponse = new HttpResponse();
        animalsResponse.setHeader('contentType', 'application/json');
        animalsResponse.setBody('{"animals": [{"id":1,"name":"pesky porcupine"},{"id":2,"name":"hungry hippo"},{"id":3,"name":"squeaky squirrel"}]}');
        animalsResponse.setStatusCode(200);
        return animalsResponse;
    }
}
 
@isTest
private class AnimalLocatorTest {
    @isTest static void AnimalLocatorMock() {
        Test.setMock(HttpCalloutMock.class, new AnimalLocatorMock());
        String actual = AnimalLocator.getAnimalNameById(2);
        String expected = 'hungry hippo';
        System.assertEquals(actual, expected);
     }
}


 


 
I need to track down the issues in an automated process that is supposed to be creating accounts in Salesforce.  I thought the best option for this might be a debug log, but I'm a bit overwhelmed with all the Salesforce documentation. The accounts are being created, but are missing some of the fields that should be populated.

Debugger seems to be primarily for tracking all the actions of a user?  Could you provide some direction for creating a debug log specifically for this type of use case or provide a better reference for breaking down ways of creating debug logs?

 
We did a complimentary install for a customer, but they claim not to have received the email detailing that the install failed.  Where else can I look to get details as to why the installation failed?
I'm using an Apex plugin in a flow. The Apex Class implements Process.Plugin to collect inputs of the URI, Auth Token, and object requested, makes an HTTP GET callout, and returns the json results for the object. I finally got the test returning the right outputs from my mock class and passes the tests easy breezy. But when I use it in the flow,  the Debug says  I'm getting a run-time 'Invalid conversion from runtime type List to Map '.

There's a Process.PluginResult method that does most of the action, a doGet() method that does the Http callout, deserializes the Json, returns the results to the PluginResult method, and the Process.Plugin Describe method that defines the inputs for the flow.  Now in the process of trying to make this work- I did make the doGet() method invocable- which required nested List results.  The doGet method returns a list of lists (Key List and Values List), and then I map them back together once the results have returned to the PluginResult method.

Is stitching the list back together in the Result method breaking my flow? Will my Http callout work if it returns a map instead of a List of Lists?
Or do I need to somehow control which method's results are returning at runtime?

 
Really stuck on this one.

Wanted to create an Apex Plugin for a Flow that could accept parameters to make an Http Get request.  

I have 3 classes - the base HttpGetPlugin class, the HttpGetPlugin_Test class, and the HttpGetPlugin_Mock class.
I found I needed to use an Invocable Method in order to pass the parameter for the request as HttpGet methods do not accept parameters, which overcomplicated things - and now I'm stuck on a "List index out of bounds". I've tried adding some list size verifications, but they've never seemed to help.  Grateful for any assistance.
 
@RestResource(urlmapping='/HttpGetPlugin')
global class HttpGetPlugin implements Process.Plugin {
        
	// The main method to be implemented. The Flow calls this at runtime.
	global Process.PluginResult invoke(Process.PluginRequest request) { 
        // Get the variables from the flow
        String GetURL = (String) request.inputParameters.get('GetURL');
        System.debug('GetURL = ' + GetURL);
        
        // Create List to hold Http Get parameters b/c @HttpGet methods won't take params- @Invokable methods can- but they can only take one (type List only)!  Grrrr!
        List<String> HttpGetReq = new List<String>();
        	HttpGetReq.set(0,GetURL);
      	System.debug('HttpGetReq = ' + HttpGetReq);
        
        if(HttpGetReq.size() > 0) {
    		doGet(HttpGetReq);
        }

        // return to Flow
        Map<String,String> result = new Map<String,String>();
        return new Process.PluginResult(result);
    
    }
    
    @InvocableMethod(label='Http GET Request')
    global static List<String> doGet(List<String> HttpGetReq) { 

        // Instantiate a new http object
         Http h = new Http();

        // Instantiate a new HTTP Get request
         HttpRequest req = new HttpRequest();
        if(HttpGetReq.size() > 0) {
         req.setEndpoint(HttpGetReq.get(0));
        } else { System.debug('Endpoint is null');}    
         req.setMethod('GET');
         req.setHeader('Content-Type', 'application/json;charset=UTF-8');
  
        // Send the request, and return a response
        HttpResponse res = h.send(req);
        List<String> HttpGetRes = new List<String>();
        if (res.getStatusCode() == 200) {
            // Deserializes the JSON string into String
            String getResult = (String) JSON.deserializeUntyped(res.getBody());
            if(getResult != null) {
            	HttpGetRes.set(0,getResult);
            }
        }
        return HttpGetRes;
    }
        
    global Process.PluginDescribeResult describe() {
        Process.PluginDescribeResult result = new Process.PluginDescribeResult(); 
        result.Name = 'HTTP GET Plugin';
        result.inputParameters = new List<Process.PluginDescribeResult.InputParameter> { 
               new Process.PluginDescribeResult.InputParameter('GetURL','Enter URL to make GET Request.', Process.PluginDescribeResult.ParameterType.STRING, true)
            };
        result.outputParameters = new List<Process.PluginDescribeResult.OutputParameter> { 
               new Process.PluginDescribeResult.OutputParameter('HttpResponseString','The parsed JSON response from the Http GET Request', Process.PluginDescribeResult.ParameterType.STRING)
            };        
        return result; 
    } 

}
 
@isTest
public class HttpGetPlugin_Test{
   
   static testMethod void test_PluginRequest_UseCase1(){
       HttpGetPlugin obj01 = new HttpGetPlugin();
       Map<String, Object> inputParams = new Map<String, Object>();
       	inputParams.put('GetURL', 'https://api.somewebsite.com/animals');
   
    Process.PluginRequest request = new Process.PluginRequest(inputParams);
    obj01.invoke(request);
    Process.PluginDescribeResult result = obj01.describe();      
  }
    
    @isTest public static void testGetCallout(){
        List<String> actualGetRequest = new List<String>();
        	actualgetRequest.add(0,'https://api.somewebsite.com/animals');
        
        Test.setMock(HttpCalloutMock.class, new HttpGetPlugin_Mock());        
        
        Test.startTest();
            HttpGetPlugin.doGet(actualGetRequest);    
        Test.stopTest();  
                    
       // Verify that the response received contains fake values
       	List<String> actualGetResponse = HttpGetPlugin.doGet(actualGetRequest);
        System.debug(actualGetResponse);
        List<String> expectedGetResponse = new List<String>();
        	expectedGetResponse.set(0,'');
       	System.assertEquals(actualGetResponse, expectedGetResponse);
    }
    
    static testMethod void test_describe_UseCase1(){
        HttpGetPlugin obj01 = new HttpGetPlugin();
        obj01.describe();
  }
}
 
@isTest global class HttpGetPlugin_Mock implements HttpCalloutMock {
    global static HttpResponse respond(HttpRequest request) {
        HttpResponse HttpGetResponse = new HttpResponse();
        HttpGetResponse.setHeader('contentType', 'application/json');
        HttpGetResponse.setBody('{"id":2,"name":"hungry hippo","diet":"marbles","color":"purple"}');
        HttpGetResponse.setStatusCode(200);
        return HttpGetResponse;
    }
}

 
I have several questions regarding the Apex REST Callouts Challenge.

1. In many of the posted examples I have seen where people are receiving similar errors to mine, the endpoint is:
request.setEndpoint('https://th-apex-http-callout.herokuapp.com/animals/' + id);
I'm used to working with URL parameters passed as "/?id=001".  Why is this different?

2.  I'm continuing to have problems getting my code to test without a Type mismatch error.  In my AnimalLocatorMock class, I passed the response as 
animalsResponse.setBody('{"animals": [{"id":1,"name":"pesky porcupine"},{"id":2,"name":"hungry hippo"},{"id":3,"name":"squeaky squirrel"}]}');
but in other examples, I see test data as
response.setBody('{"animal":{"id":1,"name":"chicken","eats":"chicken food","says":"cluck cluck"}}');
where the mock data seems to reflect the result of a single record - which would make sense, if I'm passing a specific id, the 'get' request is forming the query, right? 

The error I get is "Invalid conversion from runtime type List<ANY> to Map <String, Any>"; however, in my code, I am not defining anything as a "List".  Is this because I have set my test example response to reflect multiple records, instead of a single record defined by Id?  Is Apex seeing that the same key is getting used, and thus defining my collection as a List instead of a String? Is this why I get the type mismatch?

3. I am not super clear on what "MAP" is doing, even after reading the Apex documentation- I've seen examples of "Map <String, Object>", "Map <String, String>", and "Map (String, Object)". Am I defining the data types that my collection will become when I assign variables in my method? What is the difference between using syntax of "<>" vs "()"?

4. I see a lot of reference to using "JSON2Apex Tool" to parse the JSON for advanced JSON strings.  I have had the most minimal interaction with Heroku, and the link presented in the Trail is to a web tool.  If I'm creating a class that will operate independently on its own, I don't really see how I'm supposed to use that.

Is the "JSON2Apex Tool" something that inherently comes with a Salesforce instance, or is it something I add to my instance and call from my class?

AND the tutorial refers to the "built-in JSONParser class", but if I look at my Classes from Settings > Develop > Apex Classes, I do not see a JSONParser class listed.  What is meant by "built-in"?


For Reference, my full code:
public class AnimalLocator { 
    public static String getAnimalNameById(Integer id) {        
        String animalName;
        Http http = new Http();
        HttpRequest request = new HttpRequest();
        request.setEndpoint('https://th-apex-http-callout.herokuapp.com/animals/' + id);
        request.setMethod('GET');
        HttpResponse animalsResponse = http.send(request);

        if (animalsResponse.getStatusCode() == 200) {
            Map<String, Object> results = (Map<String, Object>) JSON.deserializeUntyped(animalsResponse.getBody());
            System.debug('Converted JSON results: ' + results);
	        Map<String, Object> animalDetails = (Map<String, Object>) results.get('animals');
            System.debug('animalDetails: ' + animalDetails);

            animalName = (String) animalDetails.get('name');
            System.debug('Animal Name:' + animalName);
            }
        return animalName;
        }
    }
 
@isTest global class AnimalLocatorMock implements HttpCalloutMock {
    global HttpResponse respond(HttpRequest request) {
        HttpResponse animalsResponse = new HttpResponse();
        animalsResponse.setHeader('contentType', 'application/json');
        animalsResponse.setBody('{"animals": [{"id":1,"name":"pesky porcupine"},{"id":2,"name":"hungry hippo"},{"id":3,"name":"squeaky squirrel"}]}');
        animalsResponse.setStatusCode(200);
        return animalsResponse;
    }
}
 
@isTest
private class AnimalLocatorTest {
    @isTest static void AnimalLocatorMock() {
        Test.setMock(HttpCalloutMock.class, new AnimalLocatorMock());
        String actual = AnimalLocator.getAnimalNameById(2);
        String expected = 'hungry hippo';
        System.assertEquals(actual, expected);
     }
}


 


 
I'm noticing when I use the Lightning Design System it's tacking on a aura class and a 'data-aura-rendered-by' attribute. What does this do?

Thanks.

I have a flow that is used for lead assignment that uses other, existing leads as the basis for assignment. As such, there is a Record Lookup that finds another lead with the same website and grabs the LeadOwnerID. However, for some reason it keeps failing and saying that there are no leads found, even though there are definitely leads that meet that criteria. 

The issue only happens intermittently, and I cannot figure out why. 

RECORD QUERY: Find_Existing_Owner
Find one Lead record where:
OwnerId Does not equal 005d0000005BQ42
Website Equals {!WebsiteFormatter} (juniper.net)
Id Does not equal {!thisLead.Id} (00Qd000000nSdjcEAC)
Result
Failed to find record.

Has anybody had an issue like this? I tried contacting support but they said that they did not have expertise in Flows... 

Hi,

 

I have an unusual occurence occuring and I thought I'd check if anyone may know why it happens.

- I have a class instance reference which I serialise to JSON using the Apex JSON serialize function http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_json.htm

 

I then pass this Sting as an argument to a function and when I try to deserialize it to create a new class instance I get an error as follows  "Invalid conversion from runtime type String to Integer"

 

I'm a bit confused as to why, when I serialize my object to JSON using the APEX function but then try to deserialize it at a later stage that it then fails (when it's again via APEX)

 

Has anyone come across this before?  Is it a bug or is there a solution for this?

 

Thanking you in advance for any help.