Debugger: Incorrect Assignment of Id.

Issue #2075 resolved
Justin Julicher created an issue

Hi Scott

Was debugging a process today and noticed that the main Id was getting incorrectly assigned due the structure & length of the outputted object. What is happening is there is a lookup on the record and the parser is parsing the Id value of the top level object twice accidentally getting the related objects Id.

In this example line 3 is being shortened (where it’s done the … in the object) and the ContractDetailCharge__c.Id is being assigned the Id of the TradingName__c lookup.

16:21:49.179 (2697918442)|METHOD_ENTRY|[18]|01pBn0000000Ak9|CDCValidationManager.getOtherContractDetailsChargesInContract(List<ContractDetailCharge__c>)
16:21:49.179 (2697960564)|VARIABLE_SCOPE_BEGIN|[61]|cdcsToValidate|List<ContractDetailCharge__c>|true|false
16:21:49.179 (2698467466)|VARIABLE_ASSIGNMENT|[61]|cdcsToValidate|[{"ContractDetailName__r":{"MRIOccupancyStatus__c":"C","Opportunity__r":{"TradingName_lu__r":{"attributes":{"type":"TradingName__c","url":"/services/data/v45.0 (43 more) ...","Id":"a34000000000008AAA"},"Id":"a34000000000008AAA","Name":"Test Trading Name"},"Account":{"ShippingStateCode":"QLD","SCCABroadCategory__c":"10","TradingNameLookup__r":{"attributes":{"type":"TradingName__c","url":"/services/data/v45.0 (43 more) ...","Id":"a34000000000010AAA"},"Id":"a34000000000010AAA","Name":"Test Trading Name"},"BillingCountryCode":"AU","SCCAFineCategory__c":"1100","Name":"Test Account7","GRETenantEntityID__c":"123","LegalEntity__c":"123","ACN__c":"108574116","SCCASalesCategory__c":"110","RecordTypeId":"0125m0000004Lu8AAE","ShippingCountry":"Australia","GRETenantID__c":"123","GRETenantGroupID__c":"123","IndustryClassification__c":"G - Retail Trade","ABN__c":"74615982440","PropertyName__r":{"EntityCode__c":"123ABC456","ManagementType__c":"Full Management","PropertySubtype__c":"Other","GREDivisionCode_P__c":"NBA","PropertyType__c":"Other","GREPropertyID__c":"Nugget123","Name":"Test Property4","CostCentre__c":"Test Cost Centre","PropertyEmail__c":"property@qic.com","AnnualEstimatedTurnover__c":100.0,"GREPropertyShortCode__c":"SHRT","PropertyLongName__c":"LONG","RecordTypeId":"0125m0000004LuVAAU","MRIPropertyID__c":"123456","attributes":{"type":"Property__c","url":"/services/data/v45.0 (40 more) ...","Id":"a2m000000000006AAA"},"PropertyShortName__c":"SHRT","Id":"a2m000000000006AAA","State__c":"QLD"},"IndustrySubClassification__c":"41 - Food Retailing","ShippingCountryCode":"AU","BillingCountry":"Australia","BillingStateCode":"QLD","TradingNameLookup__c":"a34000000000010AAA","attributes":{"type":"Account","url":"/services/data/v45.0 (36 more) ...","Id":"001000000000009AAA"},"ShippingState":"QLD","Id":"001000000000009AAA","PropertyName__c":"a2m000000000006AAA","GREHoldingGroupID__c":"123","BillingState":"QLD"},"TenantType__c":"Specialty Retail","AccountId":"001000000000009AAA","StageName":"Commercial Negotiati (2 more) ...","SCCABroadCategory__c":"10","Property__r":{"EntityCode__c":"123ABC456","ManagementType__c":"Full Management","PropertySubtype__c":"Other","GREDivisionCode_P__c":"NBA","PropertyType__c":"Other","GREPropertyID__c":"Nugget123","Name":"Test Property4","CostCentre__c":"Test Cost Centre","PropertyEmail__c":"property@qic.com","AnnualEstimatedTurnover__c":100.0,"GREPropertyShortCode__c":"SHRT","PropertyLongName__c":"LONG","RecordTypeId":"0125m0000004LuVAAU","MRIPropertyID__c":"123456","attributes":{"type":"Property__c","url":"/services/data/v45.0 (40 more) ...","Id":"a2m000000000006AAA"},"PropertyShortName__c":"SHRT","Id":"a2m000000000006AAA","State__c":"QLD"},"SCCAFineCategory__c":"1100","CloseDate":"2022-04-05T00:00:00.000Z","Name":"Test Opportunity5","Site__r":{"VirtualSiteStatus__c":"Actual","MRISiteId__c":"TEST08","SiteStartDate__c":"2022-04-05T00:00:00.000Z","IsActive":true,"GREPropertyLevel__c":"4","Property__r":{"EntityCode__c":"123ABC456","ManagementType__c":"Full Management","PropertySubtype__c":"Other","GREDivisionCode_P__c":"NBA","PropertyType__c":"Other","GREPropertyID__c":"Nugget123","Name":"Test Property4","CostCentre__c":"Test Cost Centre","PropertyEmail__c":"property@qic.com","AnnualEstimatedTurnover__c":100.0,"GREPropertyShortCode__c":"SHRT","PropertyLongName__c":"LONG","RecordTypeId":"0125m0000004LuVAAU","MRIPropertyID__c":"123456","attributes":{"type":"Property__c","url":"/services/data/v45.0 (40 more) ...","Id":"a2m000000000006AAA"},"PropertyShortName__c":"SHRT","Id":"a2m000000000006AAA","State__c":"QLD"},"attributes":{"type":"Product2","url":"/services/data/v45.0 (37 more) ...","Id":"01t000000000005AAA"},"Property__c":"a2m000000000006AAA","MRISquareFootTypeID__c":"Common Area","Id":"01t000000000005AAA","Name":"Test Site10","AreaUnitOfMeasure__c":"Square Metre"},"TradingName_lu__c":"a34000000000008AAA","SCCASalesCategory__c":"110","RecordTypeId":"0125m0000004LuTAAU","Site__c":"01t000000000005AAA","attributes":{"type":"Opportunity","url":"/services/data/v45.0 (40 more) ...","Id":"006000000000007AAA"},"Property__c":"a2m000000000006AAA","Id":"006000000000007AAA","SpecialtyTenantType__c":"Non Food"},"SCCABroadCategory__c":"10","SiteName__c":"01t000000000005AAA","ExpiryDate__c":"2023-04-05T00:00:00.000Z","Property__r":{"EntityCode__c":"123ABC456","ManagementType__c":"Full Management","PropertySubtype__c":"Other","GREDivisionCode_P__c":"NBA","PropertyType__c":"Other","GREPropertyID__c":"Nugget123","Name":"Test Property0","CostCentre__c":"Test Cost Centre","PropertyEmail__c":"property@qic.com","PropertyBillDate__c":"2021-05-31T00:00:00.000Z","AnnualEstimatedTurnover__c":100.0,"GREPropertyShortCode__c":"SHRT","PropertyLongName__c":"LONG","RecordTypeId":"0125m0000004LuVAAU","MRIPropertyID__c":"123456","attributes":{"type":"Property__c","url":"/services/data/v45.0 (40 more) ...","Id":"a2m000000000001AAA"},"PropertyShortName__c":"SHRT","Id":"a2m000000000001AAA","State__c":"QLD"},"Tenant__r":{"ShippingStateCode":"QLD","SCCABroadCategory__c":"10","TradingNameLookup__r":{"attributes":{"type":"TradingName__c","url":"/services/data/v45.0 (43 more) ...","Id":"a34000000000004AAA"},"Id":"a34000000000004AAA","Name":"Test Trading Name"},"BillingCountryCode":"AU","SCCAFineCategory__c":"1100","Name":"Test Account11","GRETenantEntityID__c":"123","LegalEntity__c":"123","ACN__c":"101348869","SCCASalesCategory__c":"110","RecordTypeId":"0125m0000004Lu7AAE","ShippingCountry":"Australia","GRETenantID__c":"123","GRETenantGroupID__c":"123","IndustryClassification__c":"G - Retail Trade","ABN__c":"40676160794","IndustrySubClassification__c":"41 - Food Retailing","ShippingCountryCode":"AU","BillingCountry":"Australia","BillingStateCode":"QLD","TradingNameLookup__c":"a34000000000004AAA","attributes":{"type":"Account","url":"/services/data/v45.0 (36 more) ...","Id":"001000000000003AAA"},"ShippingState":"QLD","Id":"001000000000003AAA","GREHoldingGroupID__c":"123","BillingState":"QLD"},"SCCAFineCategory__c":"1100","Opportunity__c":"006000000000007AAA","Name":"Test Contract Detail (2 more) ...","ContractName__c":"800000000000011AAA","SCCASalesCategory__c":"110","RecordTypeId":"0125m0000004LuJAAU","SiteName__r":{"VirtualSiteStatus__c":"Actual","MRISiteId__c":"TEST08","SiteStartDate__c":"2022-04-05T00:00:00.000Z","IsActive":true,"GREPropertyLevel__c":"4","Property__r":{"EntityCode__c":"123ABC456","ManagementType__c":"Full Management","PropertySubtype__c":"Other","GREDivisionCode_P__c":"NBA","PropertyType__c":"Other","GREPropertyID__c":"Nugget123","Name":"Test Property4","CostCentre__c":"Test Cost Centre","PropertyEmail__c":"property@qic.com","AnnualEstimatedTurnover__c":100.0,"GREPropertyShortCode__c":"SHRT","PropertyLongName__c":"LONG","RecordTypeId":"0125m0000004LuVAAU","MRIPropertyID__c":"123456","attributes":{"type":"Property__c","url":"/services/data/v45.0 (40 more) ...","Id":"a2m000000000006AAA"},"PropertyShortName__c":"SHRT","Id":"a2m000000000006AAA","State__c":"QLD"},"attributes":{"type":"Product2","url":"/services/data/v45.0 (37 more) ...","Id":"01t000000000005AAA"},"Property__c":"a2m000000000006AAA","MRISquareFootTypeID__c":"Common Area","Id":"01t000000000005AAA","Name":"Test Site10","AreaUnitOfMeasure__c":"Square Metre"},"attributes":{"type":"ContractDetail__c","url":"/services/data/v45.0 (46 more) ...","Id":"a2Z000000000002EAA"},"Property__c":"a2m000000000001AAA","Id":"a2Z000000000002EAA","Tenant__c":"001000000000003AAA","Status__c":"Active","ContractName__r":{"Account":{"ShippingStateCode":"QLD","SCCABroadCategory__c":"10","TradingNameLookup__r":{"attributes":{"type":"TradingName__c"},"Id":"a34Bn0000000NvtIAE","Name":"Test Trading Name"},"BillingCountryCode":"AU","SCCAFineCategory__c":"1100","Name":"Test Account1","GRETenantEntityID__c":"123","LegalEntity__c":"123","ACN__c":"171494509","SCCASalesCategory__c":"110","RecordTypeId":"0125m0000004Lu8AAE","ShippingCountry":"Australia","GRETenantID__c":"123","GRETenantGroupID__c":"123","IndustryClassification__c":"G - Retail Trade","ABN__c":"61585208078","IndustrySubClassification__c":"41 - Food Retailing","ShippingCountryCode":"AU","BillingCountry":"Australia","BillingStateCode":"QLD","TradingNameLookup__c":"a34Bn0000000NvtIAE","attributes":{"type":"Account"},"ShippingState":"QLD","Id":"001Bn000000bmGzIAI","GREHoldingGroupID__c":"123","BillingState":"QLD"},"AccountId":"001Bn000000bmGzIAI","Property__r":{"EntityCode__c":"123ABC456","ManagementType__c":"Full Management","PropertySubtype__c":"Other","GREDivisionCode_P__c":"NBA","PropertyType__c":"Other","GREPropertyID__c":"Nugget123","Name":"Test Property0","CostCentre__c":"Test Cost Centre","PropertyEmail__c":"property@qic.com","PropertyBillDate__c":"2021-05-31T00:00:00.000Z","AnnualEstimatedTurnover__c":100.0,"GREPropertyShortCode__c":"SHRT","PropertyLongName__c":"LONG","RecordTypeId":"0125m0000004LuVAAU","MRIPropertyID__c":"123456","attributes":{"type":"Property__c","url":"/services/data/v45.0 (40 more) ...","Id":"a2m000000000001AAA"},"PropertyShortName__c":"SHRT","Id":"a2m000000000001AAA","State__c":"QLD"},"attributes":{"type":"Contract","url":"/services/data/v45.0 (37 more) ...","Id":"800000000000011AAA"},"Property__c":"a2m000000000001AAA","Id":"800000000000011AAA","Name":"Test Contract3"}},"ContractDetailName__c":"a2Z000000000002EAA","Property__r":{"EntityCode__c":"123ABC456","ManagementType__c":"Full Management","PropertySubtype__c":"Other","GREDivisionCode_P__c":"NBA","PropertyType__c":"Other","GREPropertyID__c":"Nugget123","Name":"Test Property0","CostCentre__c":"Test Cost Centre","PropertyEmail__c":"property@qic.com","PropertyBillDate__c":"2021-05-31T00:00:00.000Z","AnnualEstimatedTurnover__c":100.0,"GREPropertyShortCode__c":"SHRT","PropertyLongName__c":"LONG","RecordTypeId":"0125m0000004LuVAAU","MRIPropertyID__c":"123456","attributes":{"type":"Property__c","url":"/services/data/v45.0 (40 more) ...","Id":"a2m000000000001AAA"},"PropertyShortName__c":"SHRT","Id":"a2m000000000001AAA","State__c":"QLD"},"attributes":{"type":"ContractDetailCharge (3 more) ...","url":"/services/data/v45.0 (52 more) ...","Id":"a2X000000000012EAA"},"Property__c":"a2m000000000001AAA","Id":"a2X000000000012EAA","EffectiveDate__c":"2021-05-01T00:00:00.000Z","MRIIncomeCategoryCode__c":"1050","Name":"Test Contract Detail (10 more) ..."}]|0x665f0498
16:21:49.179 (2698605332)|HEAP_ALLOCATE|[62]|Bytes:5

The exact excerpt from the log that is causing the issue is:

:{"TradingName_lu__r":{"attributes":{"type":"TradingName__c","url":"/services/data/v45.0 (43 more) ...","Id":"a34000000000008AAA"},"Id":"a34000000000008AAA",

where the Id “"Id":"a34000000000008AAA"” is being outputted twice in the line and your parser is thinking the Id belongs to the parent object but infact is the child.

Now it looks like SF is outputting the log incorrectly but it makes debugging very confusing. Took me 5 minutes to work out what was going on when I was debugging as it was giving a different Id after the first method interaction.

Possibly a solution would be to check the value hasn’t already been set in parsing a log line?

thanks

Comments (16)

  1. Scott Wells repo owner

    If I follow correctly, you're saying that in the following variable assignment JSON from the log (slightly modified and reformatted):

    {
      "Parent": {
        "TradingName_lu__r": {
          "attributes": {
            "type": "TradingName__c",
            "url": "/services/data/v45.0 (43 more) ...",
            "Id": "a34000000000008AAA"
          },
          "Id": "a34000000000008AAA"
        }
      }
    }
    

    the ID value a34000000000008AAA is being attributed to both the related object and the object on which the relationship resides, correct? Assuming that's correct, as you stated, Salesforce is writing a bad JSON serialization into the log and the JSON deserialization is just going to reflect that. There's not really a good way for IC2 to determine that the ID value has been misattributed there.

    Or am I misreading this?

    UPDATE: And of course I am. The ID in this case is still on TradingName__lu__r, but it's both directly on that object and on its attributes property. And you're saying that the debugger is showing that ID on Parent in this case as well?

  2. Justin Julicher reporter

    Yeah basically in the debugger I’m getting this:

    Parent: {

    ‌ Id = “a34000000000008AAA”

    ‌ TradingName_lu__r = Object

    }

    Where Parent is not of type TradingName_lu__r which a34000000000008AAA is.

    Actually just re-examined the output of line 3 as a whole I got this:

    {
      "ContractDetailName__r": {
        "MRIOccupancyStatus__c": "C",
        "Opportunity__r": {
          "TradingName_lu__r": {
            "attributes": {
              "type": "TradingName__c",
              "url": "/services/data/v45.0 (43 more) ...",
              "Id": "a34000000000008AAA"
            },
            "Id": "a34000000000008AAA",
            "Name": "Test Trading Name"
          },
          "Account": {
            "ShippingStateCode": "QLD",
            "SCCABroadCategory__c": "10",
            "TradingNameLookup__r": {
              "attributes": {
                "type": "TradingName__c",
                "url": "/services/data/v45.0 (43 more) ...",
                "Id": "a34000000000010AAA"
              },
              "Id": "a34000000000010AAA",
              "Name": "Test Trading Name"
            },
            "BillingCountryCode": "AU",
            "SCCAFineCategory__c": "1100",
            "Name": "Test Account7",
            "GRETenantEntityID__c": "123",
            "LegalEntity__c": "123",
            "ACN__c": "108574116",
            "SCCASalesCategory__c": "110",
            "RecordTypeId": "0125m0000004Lu8AAE",
            "ShippingCountry": "Australia",
            "GRETenantID__c": "123",
            "GRETenantGroupID__c": "123",
            "IndustryClassification__c": "G - Retail Trade",
            "ABN__c": "74615982440",
            "PropertyName__r": {
              "EntityCode__c": "123ABC456",
              "ManagementType__c": "Full Management",
              "PropertySubtype__c": "Other",
              "GREDivisionCode_P__c": "NBA",
              "PropertyType__c": "Other",
              "GREPropertyID__c": "Nugget123",
              "Name": "Test Property4",
              "CostCentre__c": "Test Cost Centre",
              "PropertyEmail__c": "property@qic.com",
              "AnnualEstimatedTurnover__c": 100.0,
              "GREPropertyShortCode__c": "SHRT",
              "PropertyLongName__c": "LONG",
              "RecordTypeId": "0125m0000004LuVAAU",
              "MRIPropertyID__c": "123456",
              "attributes": {
                "type": "Property__c",
                "url": "/services/data/v45.0 (40 more) ...",
                "Id": "a2m000000000006AAA"
              },
              "PropertyShortName__c": "SHRT",
              "Id": "a2m000000000006AAA",
              "State__c": "QLD"
            },
            "IndustrySubClassification__c": "41 - Food Retailing",
            "ShippingCountryCode": "AU",
            "BillingCountry": "Australia",
            "BillingStateCode": "QLD",
            "TradingNameLookup__c": "a34000000000010AAA",
            "attributes": {
              "type": "Account",
              "url": "/services/data/v45.0 (36 more) ...",
              "Id": "001000000000009AAA"
            },
            "ShippingState": "QLD",
            "Id": "001000000000009AAA",
            "PropertyName__c": "a2m000000000006AAA",
            "GREHoldingGroupID__c": "123",
            "BillingState": "QLD"
          },
          "TenantType__c": "Specialty Retail",
          "AccountId": "001000000000009AAA",
          "StageName": "Commercial Negotiati (2 more) ...",
          "SCCABroadCategory__c": "10",
          "Property__r": {
            "EntityCode__c": "123ABC456",
            "ManagementType__c": "Full Management",
            "PropertySubtype__c": "Other",
            "GREDivisionCode_P__c": "NBA",
            "PropertyType__c": "Other",
            "GREPropertyID__c": "Nugget123",
            "Name": "Test Property4",
            "CostCentre__c": "Test Cost Centre",
            "PropertyEmail__c": "property@qic.com",
            "AnnualEstimatedTurnover__c": 100.0,
            "GREPropertyShortCode__c": "SHRT",
            "PropertyLongName__c": "LONG",
            "RecordTypeId": "0125m0000004LuVAAU",
            "MRIPropertyID__c": "123456",
            "attributes": {
              "type": "Property__c",
              "url": "/services/data/v45.0 (40 more) ...",
              "Id": "a2m000000000006AAA"
            },
            "PropertyShortName__c": "SHRT",
            "Id": "a2m000000000006AAA",
            "State__c": "QLD"
          },
          "SCCAFineCategory__c": "1100",
          "CloseDate": "2022-04-05T00:00:00.000Z",
          "Name": "Test Opportunity5",
          "Site__r": {
            "VirtualSiteStatus__c": "Actual",
            "MRISiteId__c": "TEST08",
            "SiteStartDate__c": "2022-04-05T00:00:00.000Z",
            "IsActive": true,
            "GREPropertyLevel__c": "4",
            "Property__r": {
              "EntityCode__c": "123ABC456",
              "ManagementType__c": "Full Management",
              "PropertySubtype__c": "Other",
              "GREDivisionCode_P__c": "NBA",
              "PropertyType__c": "Other",
              "GREPropertyID__c": "Nugget123",
              "Name": "Test Property4",
              "CostCentre__c": "Test Cost Centre",
              "PropertyEmail__c": "property@qic.com",
              "AnnualEstimatedTurnover__c": 100.0,
              "GREPropertyShortCode__c": "SHRT",
              "PropertyLongName__c": "LONG",
              "RecordTypeId": "0125m0000004LuVAAU",
              "MRIPropertyID__c": "123456",
              "attributes": {
                "type": "Property__c",
                "url": "/services/data/v45.0 (40 more) ...",
                "Id": "a2m000000000006AAA"
              },
              "PropertyShortName__c": "SHRT",
              "Id": "a2m000000000006AAA",
              "State__c": "QLD"
            },
            "attributes": {
              "type": "Product2",
              "url": "/services/data/v45.0 (37 more) ...",
              "Id": "01t000000000005AAA"
            },
            "Property__c": "a2m000000000006AAA",
            "MRISquareFootTypeID__c": "Common Area",
            "Id": "01t000000000005AAA",
            "Name": "Test Site10",
            "AreaUnitOfMeasure__c": "Square Metre"
          },
          "TradingName_lu__c": "a34000000000008AAA",
          "SCCASalesCategory__c": "110",
          "RecordTypeId": "0125m0000004LuTAAU",
          "Site__c": "01t000000000005AAA",
          "attributes": {
            "type": "Opportunity",
            "url": "/services/data/v45.0 (40 more) ...",
            "Id": "006000000000007AAA"
          },
          "Property__c": "a2m000000000006AAA",
          "Id": "006000000000007AAA",
          "SpecialtyTenantType__c": "Non Food"
        },
        "SCCABroadCategory__c": "10",
        "SiteName__c": "01t000000000005AAA",
        "ExpiryDate__c": "2023-04-05T00:00:00.000Z",
        "Property__r": {
          "EntityCode__c": "123ABC456",
          "ManagementType__c": "Full Management",
          "PropertySubtype__c": "Other",
          "GREDivisionCode_P__c": "NBA",
          "PropertyType__c": "Other",
          "GREPropertyID__c": "Nugget123",
          "Name": "Test Property0",
          "CostCentre__c": "Test Cost Centre",
          "PropertyEmail__c": "property@qic.com",
          "PropertyBillDate__c": "2021-05-31T00:00:00.000Z",
          "AnnualEstimatedTurnover__c": 100.0,
          "GREPropertyShortCode__c": "SHRT",
          "PropertyLongName__c": "LONG",
          "RecordTypeId": "0125m0000004LuVAAU",
          "MRIPropertyID__c": "123456",
          "attributes": {
            "type": "Property__c",
            "url": "/services/data/v45.0 (40 more) ...",
            "Id": "a2m000000000001AAA"
          },
          "PropertyShortName__c": "SHRT",
          "Id": "a2m000000000001AAA",
          "State__c": "QLD"
        },
        "Tenant__r": {
          "ShippingStateCode": "QLD",
          "SCCABroadCategory__c": "10",
          "TradingNameLookup__r": {
            "attributes": {
              "type": "TradingName__c",
              "url": "/services/data/v45.0 (43 more) ...",
              "Id": "a34000000000004AAA"
            },
            "Id": "a34000000000004AAA",
            "Name": "Test Trading Name"
          },
          "BillingCountryCode": "AU",
          "SCCAFineCategory__c": "1100",
          "Name": "Test Account11",
          "GRETenantEntityID__c": "123",
          "LegalEntity__c": "123",
          "ACN__c": "101348869",
          "SCCASalesCategory__c": "110",
          "RecordTypeId": "0125m0000004Lu7AAE",
          "ShippingCountry": "Australia",
          "GRETenantID__c": "123",
          "GRETenantGroupID__c": "123",
          "IndustryClassification__c": "G - Retail Trade",
          "ABN__c": "40676160794",
          "IndustrySubClassification__c": "41 - Food Retailing",
          "ShippingCountryCode": "AU",
          "BillingCountry": "Australia",
          "BillingStateCode": "QLD",
          "TradingNameLookup__c": "a34000000000004AAA",
          "attributes": {
            "type": "Account",
            "url": "/services/data/v45.0 (36 more) ...",
            "Id": "001000000000003AAA"
          },
          "ShippingState": "QLD",
          "Id": "001000000000003AAA",
          "GREHoldingGroupID__c": "123",
          "BillingState": "QLD"
        },
        "SCCAFineCategory__c": "1100",
        "Opportunity__c": "006000000000007AAA",
        "Name": "Test Contract Detail (2 more) ...",
        "ContractName__c": "800000000000011AAA",
        "SCCASalesCategory__c": "110",
        "RecordTypeId": "0125m0000004LuJAAU",
        "SiteName__r": {
          "VirtualSiteStatus__c": "Actual",
          "MRISiteId__c": "TEST08",
          "SiteStartDate__c": "2022-04-05T00:00:00.000Z",
          "IsActive": true,
          "GREPropertyLevel__c": "4",
          "Property__r": {
            "EntityCode__c": "123ABC456",
            "ManagementType__c": "Full Management",
            "PropertySubtype__c": "Other",
            "GREDivisionCode_P__c": "NBA",
            "PropertyType__c": "Other",
            "GREPropertyID__c": "Nugget123",
            "Name": "Test Property4",
            "CostCentre__c": "Test Cost Centre",
            "PropertyEmail__c": "property@qic.com",
            "AnnualEstimatedTurnover__c": 100.0,
            "GREPropertyShortCode__c": "SHRT",
            "PropertyLongName__c": "LONG",
            "RecordTypeId": "0125m0000004LuVAAU",
            "MRIPropertyID__c": "123456",
            "attributes": {
              "type": "Property__c",
              "url": "/services/data/v45.0 (40 more) ...",
              "Id": "a2m000000000006AAA"
            },
            "PropertyShortName__c": "SHRT",
            "Id": "a2m000000000006AAA",
            "State__c": "QLD"
          },
          "attributes": {
            "type": "Product2",
            "url": "/services/data/v45.0 (37 more) ...",
            "Id": "01t000000000005AAA"
          },
          "Property__c": "a2m000000000006AAA",
          "MRISquareFootTypeID__c": "Common Area",
          "Id": "01t000000000005AAA",
          "Name": "Test Site10",
          "AreaUnitOfMeasure__c": "Square Metre"
        },
        "attributes": {
          "type": "ContractDetail__c",
          "url": "/services/data/v45.0 (46 more) ...",
          "Id": "a2Z000000000002EAA"
        },
        "Property__c": "a2m000000000001AAA",
        "Id": "a2Z000000000002EAA",
        "Tenant__c": "001000000000003AAA",
        "Status__c": "Active",
        "ContractName__r": {
          "Account": {
            "ShippingStateCode": "QLD",
            "SCCABroadCategory__c": "10",
            "TradingNameLookup__r": {
              "attributes": {
                "type": "TradingName__c"
              },
              "Id": "a34Bn0000000NvtIAE",
              "Name": "Test Trading Name"
            },
            "BillingCountryCode": "AU",
            "SCCAFineCategory__c": "1100",
            "Name": "Test Account1",
            "GRETenantEntityID__c": "123",
            "LegalEntity__c": "123",
            "ACN__c": "171494509",
            "SCCASalesCategory__c": "110",
            "RecordTypeId": "0125m0000004Lu8AAE",
            "ShippingCountry": "Australia",
            "GRETenantID__c": "123",
            "GRETenantGroupID__c": "123",
            "IndustryClassification__c": "G - Retail Trade",
            "ABN__c": "61585208078",
            "IndustrySubClassification__c": "41 - Food Retailing",
            "ShippingCountryCode": "AU",
            "BillingCountry": "Australia",
            "BillingStateCode": "QLD",
            "TradingNameLookup__c": "a34Bn0000000NvtIAE",
            "attributes": {
              "type": "Account"
            },
            "ShippingState": "QLD",
            "Id": "001Bn000000bmGzIAI",
            "GREHoldingGroupID__c": "123",
            "BillingState": "QLD"
          },
          "AccountId": "001Bn000000bmGzIAI",
          "Property__r": {
            "EntityCode__c": "123ABC456",
            "ManagementType__c": "Full Management",
            "PropertySubtype__c": "Other",
            "GREDivisionCode_P__c": "NBA",
            "PropertyType__c": "Other",
            "GREPropertyID__c": "Nugget123",
            "Name": "Test Property0",
            "CostCentre__c": "Test Cost Centre",
            "PropertyEmail__c": "property@qic.com",
            "PropertyBillDate__c": "2021-05-31T00:00:00.000Z",
            "AnnualEstimatedTurnover__c": 100.0,
            "GREPropertyShortCode__c": "SHRT",
            "PropertyLongName__c": "LONG",
            "RecordTypeId": "0125m0000004LuVAAU",
            "MRIPropertyID__c": "123456",
            "attributes": {
              "type": "Property__c",
              "url": "/services/data/v45.0 (40 more) ...",
              "Id": "a2m000000000001AAA"
            },
            "PropertyShortName__c": "SHRT",
            "Id": "a2m000000000001AAA",
            "State__c": "QLD"
          },
          "attributes": {
            "type": "Contract",
            "url": "/services/data/v45.0 (37 more) ...",
            "Id": "800000000000011AAA"
          },
          "Property__c": "a2m000000000001AAA",
          "Id": "800000000000011AAA",
          "Name": "Test Contract3"
        }
      },
      "ContractDetailName__c": "a2Z000000000002EAA",
      "Property__r": {
        "EntityCode__c": "123ABC456",
        "ManagementType__c": "Full Management",
        "PropertySubtype__c": "Other",
        "GREDivisionCode_P__c": "NBA",
        "PropertyType__c": "Other",
        "GREPropertyID__c": "Nugget123",
        "Name": "Test Property0",
        "CostCentre__c": "Test Cost Centre",
        "PropertyEmail__c": "property@qic.com",
        "PropertyBillDate__c": "2021-05-31T00:00:00.000Z",
        "AnnualEstimatedTurnover__c": 100.0,
        "GREPropertyShortCode__c": "SHRT",
        "PropertyLongName__c": "LONG",
        "RecordTypeId": "0125m0000004LuVAAU",
        "MRIPropertyID__c": "123456",
        "attributes": {
          "type": "Property__c",
          "url": "/services/data/v45.0 (40 more) ...",
          "Id": "a2m000000000001AAA"
        },
        "PropertyShortName__c": "SHRT",
        "Id": "a2m000000000001AAA",
        "State__c": "QLD"
      },
      "attributes": {
        "type": "ContractDetailCharge (3 more) ...",
        "url": "/services/data/v45.0 (52 more) ...",
        "Id": "a2X000000000012EAA"
      },
      "Property__c": "a2m000000000001AAA",
      "Id": "a2X000000000012EAA",
      "EffectiveDate__c": "2021-05-01T00:00:00.000Z",
      "MRIIncomeCategoryCode__c": "1050",
      "Name": "Test Contract Detail (10 more) ..."
    }
    

    As you can see the correct id should be: a2X000000000012EAA but got a34000000000008AAA

    Looking at the log as a whole I can’t actually see why the debugger got it… it doesn’t seem the JSON is incorrectly formatted.

    I’ll get a screen shot of the debugger of the whole log to show you the issue in a clearer way.

  3. Scott Wells repo owner

    What would be useful is a minimal debug log that reproduces the behavior and instructions on where to set a breakpoint (or how to step through the log) to reach the point where it happens. I don't need the associated source code, just a log. Is that something you could provide easily?

  4. Justin Julicher reporter

    Ok I’ve attached the whole log. Sorry wasn’t sure how much you would need. thanks.

  5. Scott Wells repo owner

    Thanks. I'm still struggling to reproduce this, but that's likely largely due to trying to isolate the specific behavior. What I've done is tried to fabricate a minimal debug log that evidences the issue, so I just framed your original log extract with a simple process:

    54.0 APEX_CODE,FINEST;APEX_PROFILING,ERROR;CALLOUT,INFO;DB,INFO;NBA,ERROR;SYSTEM,FINEST;VALIDATION,ERROR;VISUALFORCE,FINE;WAVE,ERROR;WORKFLOW,ERROR
    16:42:41.4 (4710045)|USER_INFO|[EXTERNAL]|0058t000000Hutu|kidarraga@qic.com.kidev|(GMT+10:00) Australian Eastern Standard Time (Australia/Brisbane)|GMT+10:00
    16:42:41.4 (4750191)|EXECUTION_STARTED
    16:42:41.4 (4756885)|CODE_UNIT_STARTED|[EXTERNAL]|01pBn0000000C9F|CDCValidationManager_Test.duplicateUnbilledCDC()
    16:21:49.179 (2697960564)|VARIABLE_SCOPE_BEGIN|[61]|cdcsToValidate|List<ContractDetailCharge__c>|true|false
    16:21:49.179 (2698467466)|VARIABLE_ASSIGNMENT|[61]|cdcsToValidate|[{"ContractDetailName__r":{"MRIOccupancyStatus__c":"C","Opportunity__r":{"TradingName_lu__r":{"attributes":{"type":"TradingName__c","url":"/services/data/v45.0 (43 more) ...","Id":"a34000000000008AAA"},"Id":"a34000000000008AAA","Name":"Test Trading Name"},"Account":{"ShippingStateCode":"QLD","SCCABroadCategory__c":"10","TradingNameLookup__r":{"attributes":{"type":"TradingName__c","url":"/services/data/v45.0 (43 more) ...","Id":"a34000000000010AAA"},"Id":"a34000000000010AAA","Name":"Test Trading Name"},"BillingCountryCode":"AU","SCCAFineCategory__c":"1100","Name":"Test Account7","GRETenantEntityID__c":"123","LegalEntity__c":"123","ACN__c":"108574116","SCCASalesCategory__c":"110","RecordTypeId":"0125m0000004Lu8AAE","ShippingCountry":"Australia","GRETenantID__c":"123","GRETenantGroupID__c":"123","IndustryClassification__c":"G - Retail Trade","ABN__c":"74615982440","PropertyName__r":{"EntityCode__c":"123ABC456","ManagementType__c":"Full Management","PropertySubtype__c":"Other","GREDivisionCode_P__c":"NBA","PropertyType__c":"Other","GREPropertyID__c":"Nugget123","Name":"Test Property4","CostCentre__c":"Test Cost Centre","PropertyEmail__c":"property@qic.com","AnnualEstimatedTurnover__c":100.0,"GREPropertyShortCode__c":"SHRT","PropertyLongName__c":"LONG","RecordTypeId":"0125m0000004LuVAAU","MRIPropertyID__c":"123456","attributes":{"type":"Property__c","url":"/services/data/v45.0 (40 more) ...","Id":"a2m000000000006AAA"},"PropertyShortName__c":"SHRT","Id":"a2m000000000006AAA","State__c":"QLD"},"IndustrySubClassification__c":"41 - Food Retailing","ShippingCountryCode":"AU","BillingCountry":"Australia","BillingStateCode":"QLD","TradingNameLookup__c":"a34000000000010AAA","attributes":{"type":"Account","url":"/services/data/v45.0 (36 more) ...","Id":"001000000000009AAA"},"ShippingState":"QLD","Id":"001000000000009AAA","PropertyName__c":"a2m000000000006AAA","GREHoldingGroupID__c":"123","BillingState":"QLD"},"TenantType__c":"Specialty Retail","AccountId":"001000000000009AAA","StageName":"Commercial Negotiati (2 more) ...","SCCABroadCategory__c":"10","Property__r":{"EntityCode__c":"123ABC456","ManagementType__c":"Full Management","PropertySubtype__c":"Other","GREDivisionCode_P__c":"NBA","PropertyType__c":"Other","GREPropertyID__c":"Nugget123","Name":"Test Property4","CostCentre__c":"Test Cost Centre","PropertyEmail__c":"property@qic.com","AnnualEstimatedTurnover__c":100.0,"GREPropertyShortCode__c":"SHRT","PropertyLongName__c":"LONG","RecordTypeId":"0125m0000004LuVAAU","MRIPropertyID__c":"123456","attributes":{"type":"Property__c","url":"/services/data/v45.0 (40 more) ...","Id":"a2m000000000006AAA"},"PropertyShortName__c":"SHRT","Id":"a2m000000000006AAA","State__c":"QLD"},"SCCAFineCategory__c":"1100","CloseDate":"2022-04-05T00:00:00.000Z","Name":"Test Opportunity5","Site__r":{"VirtualSiteStatus__c":"Actual","MRISiteId__c":"TEST08","SiteStartDate__c":"2022-04-05T00:00:00.000Z","IsActive":true,"GREPropertyLevel__c":"4","Property__r":{"EntityCode__c":"123ABC456","ManagementType__c":"Full Management","PropertySubtype__c":"Other","GREDivisionCode_P__c":"NBA","PropertyType__c":"Other","GREPropertyID__c":"Nugget123","Name":"Test Property4","CostCentre__c":"Test Cost Centre","PropertyEmail__c":"property@qic.com","AnnualEstimatedTurnover__c":100.0,"GREPropertyShortCode__c":"SHRT","PropertyLongName__c":"LONG","RecordTypeId":"0125m0000004LuVAAU","MRIPropertyID__c":"123456","attributes":{"type":"Property__c","url":"/services/data/v45.0 (40 more) ...","Id":"a2m000000000006AAA"},"PropertyShortName__c":"SHRT","Id":"a2m000000000006AAA","State__c":"QLD"},"attributes":{"type":"Product2","url":"/services/data/v45.0 (37 more) ...","Id":"01t000000000005AAA"},"Property__c":"a2m000000000006AAA","MRISquareFootTypeID__c":"Common Area","Id":"01t000000000005AAA","Name":"Test Site10","AreaUnitOfMeasure__c":"Square Metre"},"TradingName_lu__c":"a34000000000008AAA","SCCASalesCategory__c":"110","RecordTypeId":"0125m0000004LuTAAU","Site__c":"01t000000000005AAA","attributes":{"type":"Opportunity","url":"/services/data/v45.0 (40 more) ...","Id":"006000000000007AAA"},"Property__c":"a2m000000000006AAA","Id":"006000000000007AAA","SpecialtyTenantType__c":"Non Food"},"SCCABroadCategory__c":"10","SiteName__c":"01t000000000005AAA","ExpiryDate__c":"2023-04-05T00:00:00.000Z","Property__r":{"EntityCode__c":"123ABC456","ManagementType__c":"Full Management","PropertySubtype__c":"Other","GREDivisionCode_P__c":"NBA","PropertyType__c":"Other","GREPropertyID__c":"Nugget123","Name":"Test Property0","CostCentre__c":"Test Cost Centre","PropertyEmail__c":"property@qic.com","PropertyBillDate__c":"2021-05-31T00:00:00.000Z","AnnualEstimatedTurnover__c":100.0,"GREPropertyShortCode__c":"SHRT","PropertyLongName__c":"LONG","RecordTypeId":"0125m0000004LuVAAU","MRIPropertyID__c":"123456","attributes":{"type":"Property__c","url":"/services/data/v45.0 (40 more) ...","Id":"a2m000000000001AAA"},"PropertyShortName__c":"SHRT","Id":"a2m000000000001AAA","State__c":"QLD"},"Tenant__r":{"ShippingStateCode":"QLD","SCCABroadCategory__c":"10","TradingNameLookup__r":{"attributes":{"type":"TradingName__c","url":"/services/data/v45.0 (43 more) ...","Id":"a34000000000004AAA"},"Id":"a34000000000004AAA","Name":"Test Trading Name"},"BillingCountryCode":"AU","SCCAFineCategory__c":"1100","Name":"Test Account11","GRETenantEntityID__c":"123","LegalEntity__c":"123","ACN__c":"101348869","SCCASalesCategory__c":"110","RecordTypeId":"0125m0000004Lu7AAE","ShippingCountry":"Australia","GRETenantID__c":"123","GRETenantGroupID__c":"123","IndustryClassification__c":"G - Retail Trade","ABN__c":"40676160794","IndustrySubClassification__c":"41 - Food Retailing","ShippingCountryCode":"AU","BillingCountry":"Australia","BillingStateCode":"QLD","TradingNameLookup__c":"a34000000000004AAA","attributes":{"type":"Account","url":"/services/data/v45.0 (36 more) ...","Id":"001000000000003AAA"},"ShippingState":"QLD","Id":"001000000000003AAA","GREHoldingGroupID__c":"123","BillingState":"QLD"},"SCCAFineCategory__c":"1100","Opportunity__c":"006000000000007AAA","Name":"Test Contract Detail (2 more) ...","ContractName__c":"800000000000011AAA","SCCASalesCategory__c":"110","RecordTypeId":"0125m0000004LuJAAU","SiteName__r":{"VirtualSiteStatus__c":"Actual","MRISiteId__c":"TEST08","SiteStartDate__c":"2022-04-05T00:00:00.000Z","IsActive":true,"GREPropertyLevel__c":"4","Property__r":{"EntityCode__c":"123ABC456","ManagementType__c":"Full Management","PropertySubtype__c":"Other","GREDivisionCode_P__c":"NBA","PropertyType__c":"Other","GREPropertyID__c":"Nugget123","Name":"Test Property4","CostCentre__c":"Test Cost Centre","PropertyEmail__c":"property@qic.com","AnnualEstimatedTurnover__c":100.0,"GREPropertyShortCode__c":"SHRT","PropertyLongName__c":"LONG","RecordTypeId":"0125m0000004LuVAAU","MRIPropertyID__c":"123456","attributes":{"type":"Property__c","url":"/services/data/v45.0 (40 more) ...","Id":"a2m000000000006AAA"},"PropertyShortName__c":"SHRT","Id":"a2m000000000006AAA","State__c":"QLD"},"attributes":{"type":"Product2","url":"/services/data/v45.0 (37 more) ...","Id":"01t000000000005AAA"},"Property__c":"a2m000000000006AAA","MRISquareFootTypeID__c":"Common Area","Id":"01t000000000005AAA","Name":"Test Site10","AreaUnitOfMeasure__c":"Square Metre"},"attributes":{"type":"ContractDetail__c","url":"/services/data/v45.0 (46 more) ...","Id":"a2Z000000000002EAA"},"Property__c":"a2m000000000001AAA","Id":"a2Z000000000002EAA","Tenant__c":"001000000000003AAA","Status__c":"Active","ContractName__r":{"Account":{"ShippingStateCode":"QLD","SCCABroadCategory__c":"10","TradingNameLookup__r":{"attributes":{"type":"TradingName__c"},"Id":"a34Bn0000000NvtIAE","Name":"Test Trading Name"},"BillingCountryCode":"AU","SCCAFineCategory__c":"1100","Name":"Test Account1","GRETenantEntityID__c":"123","LegalEntity__c":"123","ACN__c":"171494509","SCCASalesCategory__c":"110","RecordTypeId":"0125m0000004Lu8AAE","ShippingCountry":"Australia","GRETenantID__c":"123","GRETenantGroupID__c":"123","IndustryClassification__c":"G - Retail Trade","ABN__c":"61585208078","IndustrySubClassification__c":"41 - Food Retailing","ShippingCountryCode":"AU","BillingCountry":"Australia","BillingStateCode":"QLD","TradingNameLookup__c":"a34Bn0000000NvtIAE","attributes":{"type":"Account"},"ShippingState":"QLD","Id":"001Bn000000bmGzIAI","GREHoldingGroupID__c":"123","BillingState":"QLD"},"AccountId":"001Bn000000bmGzIAI","Property__r":{"EntityCode__c":"123ABC456","ManagementType__c":"Full Management","PropertySubtype__c":"Other","GREDivisionCode_P__c":"NBA","PropertyType__c":"Other","GREPropertyID__c":"Nugget123","Name":"Test Property0","CostCentre__c":"Test Cost Centre","PropertyEmail__c":"property@qic.com","PropertyBillDate__c":"2021-05-31T00:00:00.000Z","AnnualEstimatedTurnover__c":100.0,"GREPropertyShortCode__c":"SHRT","PropertyLongName__c":"LONG","RecordTypeId":"0125m0000004LuVAAU","MRIPropertyID__c":"123456","attributes":{"type":"Property__c","url":"/services/data/v45.0 (40 more) ...","Id":"a2m000000000001AAA"},"PropertyShortName__c":"SHRT","Id":"a2m000000000001AAA","State__c":"QLD"},"attributes":{"type":"Contract","url":"/services/data/v45.0 (37 more) ...","Id":"800000000000011AAA"},"Property__c":"a2m000000000001AAA","Id":"800000000000011AAA","Name":"Test Contract3"}},"ContractDetailName__c":"a2Z000000000002EAA","Property__r":{"EntityCode__c":"123ABC456","ManagementType__c":"Full Management","PropertySubtype__c":"Other","GREDivisionCode_P__c":"NBA","PropertyType__c":"Other","GREPropertyID__c":"Nugget123","Name":"Test Property0","CostCentre__c":"Test Cost Centre","PropertyEmail__c":"property@qic.com","PropertyBillDate__c":"2021-05-31T00:00:00.000Z","AnnualEstimatedTurnover__c":100.0,"GREPropertyShortCode__c":"SHRT","PropertyLongName__c":"LONG","RecordTypeId":"0125m0000004LuVAAU","MRIPropertyID__c":"123456","attributes":{"type":"Property__c","url":"/services/data/v45.0 (40 more) ...","Id":"a2m000000000001AAA"},"PropertyShortName__c":"SHRT","Id":"a2m000000000001AAA","State__c":"QLD"},"attributes":{"type":"ContractDetailCharge (3 more) ...","url":"/services/data/v45.0 (52 more) ...","Id":"a2X000000000012EAA"},"Property__c":"a2m000000000001AAA","Id":"a2X000000000012EAA","EffectiveDate__c":"2021-05-01T00:00:00.000Z","MRIIncomeCategoryCode__c":"1050","Name":"Test Contract Detail (10 more) ..."}]|0x665f0498
    16:42:43.81 (2446567658)|CODE_UNIT_FINISHED|CDCValidationManager_Test.duplicateUnbilledCDC()
    16:42:43.81 (2446572838)|EXECUTION_FINISHED
    

    I then paste that into Log Analyzer and click the Debug toolbar button to view the value for cdcsToValidate in the debugger's variables view. Unfortunately I'm not seeing the cited behavior there.

    Are you able to create a VERY simple, isolated log that, when pasted/debugged as described above, reproduces the behavior?

  6. Justin Julicher reporter

    I’ll try - what I found when examining it in the debugger it was only after it was passed as a parameter through a method that it exhibited the behaviour.

  7. Justin Julicher reporter

    Ok so here is the example:

    As you can see the Id is set to a2X000000000012EAA

    Here it is as a item in a list and the ID is a34000000000008AAA

    I’ll look to see if I can replicate the issue some other way.

  8. Justin Julicher reporter

    As far as I can tell there are a lot more values in the JSON for that assignment line:

    15:48:11.872 (7407493742)|VARIABLE_ASSIGNMENT|[8]|contractDetailChargesToValidate|[{"ContractDetailName__r":{"MRIOccupancyStatus__c":"C","Opportunity__r":{"TradingName_lu__r":{"attributes":{"type":"TradingName__c","url":"/services/data/v45.0 (43 more) ...","Id":"a34000000000008AAA"},"Id":"a34000000000008AAA","Name":"Test Trading Name"},"Account":{"ShippingStateCode":"QLD","SCCABroadCategory__c":"10","TradingNameLookup__r":{"attributes":{"type":"TradingName__c","url":"/services/data/v45.0 (43 more) ...","Id":"a34000000000010AAA"},"Id":"a34000000000010AAA","Name":"Test Trading Name"},"BillingCountryCode":"AU","SCCAFineCategory__c":"1100","Name":"Test Account7","GRETenantEntityID__c":"123","LegalEntity__c":"123","ACN__c":"179240487","SCCASalesCategory__c":"110","RecordTypeId":"0125m0000004Lu8AAE","ShippingCountry":"Australia","GRETenantID__c":"123","GRETenantGroupID__c":"123","IndustryClassification__c":"G - Retail Trade","ABN__c":"24775666134","PropertyName__r":{"EntityCode__c":"123ABC456","ManagementType__c":"Full Management","PropertySubtype__c":"Other","GREDivisionCode_P__c":"NBA","PropertyType__c":"Other","GREPropertyID__c":"Nugget123","Name":"Test Property4","CostCentre__c":"Test Cost Centre","PropertyEmail__c":"property@qic.com","AnnualEstimatedTurnover__c":100.0,"GREPropertyShortCode__c":"SHRT","PropertyLongName__c":"LONG","RecordTypeId":"0125m0000004LuVAAU","MRIPropertyID__c":"123456","attributes":{"type":"Property__c","url":"/services/data/v45.0 (40 more) ...","Id":"a2m000000000006AAA"},"PropertyShortName__c":"SHRT","Id":"a2m000000000006AAA","State__c":"QLD"},"IndustrySubClassification__c":"41 - Food Retailing","ShippingCountryCode":"AU","BillingCountry":"Australia","BillingStateCode":"QLD","TradingNameLookup__c":"a34000000000010AAA","attributes":{"type":"Account","url":"/services/data/v45.0 (36 more) ...","Id":"001000000000009AAA"},"ShippingState":"QLD","Id":"001000000000009AAA","PropertyName__c":"a2m000000000006AAA","GREHoldingGroupID__c":"123","BillingState":"QLD"},"TenantType__c":"Specialty Retail","AccountId":"001000000000009AAA","StageName":"Commercial Negotiati (2 more) ...","SCCABroadCategory__c":"10","Property__r":{"EntityCode__c":"123ABC456","ManagementType__c":"Full Management","PropertySubtype__c":"Other","GREDivisionCode_P__c":"NBA","PropertyType__c":"Other","GREPropertyID__c":"Nugget123","Name":"Test Property4","CostCentre__c":"Test Cost Centre","PropertyEmail__c":"property@qic.com","AnnualEstimatedTurnover__c":100.0,"GREPropertyShortCode__c":"SHRT","PropertyLongName__c":"LONG","RecordTypeId":"0125m0000004LuVAAU","MRIPropertyID__c":"123456","attributes":{"type":"Property__c","url":"/services/data/v45.0 (40 more) ...","Id":"a2m000000000006AAA"},"PropertyShortName__c":"SHRT","Id":"a2m000000000006AAA","State__c":"QLD"},"SCCAFineCategory__c":"1100","CloseDate":"2022-04-07T00:00:00.000Z","Name":"Test Opportunity5","Site__r":{"VirtualSiteStatus__c":"Actual","MRISiteId__c":"TEST08","SiteStartDate__c":"2022-04-07T00:00:00.000Z","IsActive":true,"GREPropertyLevel__c":"4","Property__r":{"EntityCode__c":"123ABC456","ManagementType__c":"Full Management","PropertySubtype__c":"Other","GREDivisionCode_P__c":"NBA","PropertyType__c":"Other","GREPropertyID__c":"Nugget123","Name":"Test Property4","CostCentre__c":"Test Cost Centre","PropertyEmail__c":"property@qic.com","AnnualEstimatedTurnover__c":100.0,"GREPropertyShortCode__c":"SHRT","PropertyLongName__c":"LONG","RecordTypeId":"0125m0000004LuVAAU","MRIPropertyID__c":"123456","attributes":{"type":"Property__c","url":"/services/data/v45.0 (40 more) ...","Id":"a2m000000000006AAA"},"PropertyShortName__c":"SHRT","Id":"a2m000000000006AAA","State__c":"QLD"},"attributes":{"type":"Product2","url":"/services/data/v45.0 (37 more) ...","Id":"01t000000000005AAA"},"Property__c":"a2m000000000006AAA","MRISquareFootTypeID__c":"Common Area","Id":"01t000000000005AAA","Name":"Test Site10","AreaUnitOfMeasure__c":"Square Metre"},"TradingName_lu__c":"a34000000000008AAA","SCCASalesCategory__c":"110","RecordTypeId":"0125m0000004LuTAAU","Site__c":"01t000000000005AAA","attributes":{"type":"Opportunity","url":"/services/data/v45.0 (40 more) ...","Id":"006000000000007AAA"},"Property__c":"a2m000000000006AAA","Id":"006000000000007AAA","SpecialtyTenantType__c":"Non Food"},"SCCABroadCategory__c":"10","SiteName__c":"01t000000000005AAA","ExpiryDate__c":"2023-04-07T00:00:00.000Z","Property__r":{"EntityCode__c":"123ABC456","ManagementType__c":"Full Management","PropertySubtype__c":"Other","GREDivisionCode_P__c":"NBA","PropertyType__c":"Other","GREPropertyID__c":"Nugget123","Name":"Test Property0","CostCentre__c":"Test Cost Centre","PropertyEmail__c":"property@qic.com","PropertyBillDate__c":"2021-05-31T00:00:00.000Z","AnnualEstimatedTurnover__c":100.0,"GREPropertyShortCode__c":"SHRT","PropertyLongName__c":"LONG","RecordTypeId":"0125m0000004LuVAAU","MRIPropertyID__c":"123456","attributes":{"type":"Property__c","url":"/services/data/v45.0 (40 more) ...","Id":"a2m000000000001AAA"},"PropertyShortName__c":"SHRT","Id":"a2m000000000001AAA","State__c":"QLD"},"Tenant__r":{"ShippingStateCode":"QLD","SCCABroadCategory__c":"10","TradingNameLookup__r":{"attributes":{"type":"TradingName__c","url":"/services/data/v45.0 (43 more) ...","Id":"a34000000000004AAA"},"Id":"a34000000000004AAA","Name":"Test Trading Name"},"BillingCountryCode":"AU","SCCAFineCategory__c":"1100","Name":"Test Account11","GRETenantEntityID__c":"123","LegalEntity__c":"123","ACN__c":"187271049","SCCASalesCategory__c":"110","RecordTypeId":"0125m0000004Lu7AAE","ShippingCountry":"Australia","GRETenantID__c":"123","GRETenantGroupID__c":"123","IndustryClassification__c":"G - Retail Trade","ABN__c":"23897726293","IndustrySubClassification__c":"41 - Food Retailing","ShippingCountryCode":"AU","BillingCountry":"Australia","BillingStateCode":"QLD","TradingNameLookup__c":"a34000000000004AAA","attributes":{"type":"Account","url":"/services/data/v45.0 (36 more) ...","Id":"001000000000003AAA"},"ShippingState":"QLD","Id":"001000000000003AAA","GREHoldingGroupID__c":"123","BillingState":"QLD"},"SCCAFineCategory__c":"1100","Opportunity__c":"006000000000007AAA","Name":"Test Contract Detail (2 more) ...","ContractName__c":"800000000000011AAA","SCCASalesCategory__c":"110","RecordTypeId":"0125m0000004LuJAAU","SiteName__r":{"VirtualSiteStatus__c":"Actual","MRISiteId__c":"TEST08","SiteStartDate__c":"2022-04-07T00:00:00.000Z","IsActive":true,"GREPropertyLevel__c":"4","Property__r":{"EntityCode__c":"123ABC456","ManagementType__c":"Full Management","PropertySubtype__c":"Other","GREDivisionCode_P__c":"NBA","PropertyType__c":"Other","GREPropertyID__c":"Nugget123","Name":"Test Property4","CostCentre__c":"Test Cost Centre","PropertyEmail__c":"property@qic.com","AnnualEstimatedTurnover__c":100.0,"GREPropertyShortCode__c":"SHRT","PropertyLongName__c":"LONG","RecordTypeId":"0125m0000004LuVAAU","MRIPropertyID__c":"123456","attributes":{"type":"Property__c","url":"/services/data/v45.0 (40 more) ...","Id":"a2m000000000006AAA"},"PropertyShortName__c":"SHRT","Id":"a2m000000000006AAA","State__c":"QLD"},"attributes":{"type":"Product2","url":"/services/data/v45.0 (37 more) ...","Id":"01t000000000005AAA"},"Property__c":"a2m000000000006AAA","MRISquareFootTypeID__c":"Common Area","Id":"01t000000000005AAA","Name":"Test Site10","AreaUnitOfMeasure__c":"Square Metre"},"attributes":{"type":"ContractDetail__c","url":"/services/data/v45.0 (46 more) ...","Id":"a2Z000000000002EAA"},"Property__c":"a2m000000000001AAA","Id":"a2Z000000000002EAA","Tenant__c":"001000000000003AAA","Status__c":"Active","ContractName__r":{"Account":{"ShippingStateCode":"QLD","SCCABroadCategory__c":"10","TradingNameLookup__r":{"attributes":{"type":"TradingName__c"},"Id":"a349j00000021BJAAY","Name":"Test Trading Name"},"BillingCountryCode":"AU","SCCAFineCategory__c":"1100","Name":"Test Account1","GRETenantEntityID__c":"123","LegalEntity__c":"123","ACN__c":"467800488","SCCASalesCategory__c":"110","RecordTypeId":"0125m0000004Lu8AAE","ShippingCountry":"Australia","GRETenantID__c":"123","GRETenantGroupID__c":"123","IndustryClassification__c":"G - Retail Trade","ABN__c":"62424520191","IndustrySubClassification__c":"41 - Food Retailing","ShippingCountryCode":"AU","BillingCountry":"Australia","BillingStateCode":"QLD","TradingNameLookup__c":"a349j00000021BJAAY","attributes":{"type":"Account"},"ShippingState":"QLD","Id":"0019j000000bHgDAAU","GREHoldingGroupID__c":"123","BillingState":"QLD"},"AccountId":"0019j000000bHgDAAU","Property__r":{"EntityCode__c":"123ABC456","ManagementType__c":"Full Management","PropertySubtype__c":"Other","GREDivisionCode_P__c":"NBA","PropertyType__c":"Other","GREPropertyID__c":"Nugget123","Name":"Test Property0","CostCentre__c":"Test Cost Centre","PropertyEmail__c":"property@qic.com","PropertyBillDate__c":"2021-05-31T00:00:00.000Z","AnnualEstimatedTurnover__c":100.0,"GREPropertyShortCode__c":"SHRT","PropertyLongName__c":"LONG","RecordTypeId":"0125m0000004LuVAAU","MRIPropertyID__c":"123456","attributes":{"type":"Property__c","url":"/services/data/v45.0 (40 more) ...","Id":"a2m000000000001AAA"},"PropertyShortName__c":"SHRT","Id":"a2m000000000001AAA","State__c":"QLD"},"attributes":{"type":"Contract","url":"/services/data/v45.0 (37 more) ...","Id":"800000000000011AAA"},"Property__c":"a2m000000000001AAA","Id":"800000000000011AAA","Name":"Test Contract3"}},"ContractDetailName__c":"a2Z000000000002EAA","Property__r":{"EntityCode__c":"123ABC456","ManagementType__c":"Full Management","PropertySubtype__c":"Other","GREDivisionCode_P__c":"NBA","PropertyType__c":"Other","GREPropertyID__c":"Nugget123","Name":"Test Property0","CostCentre__c":"Test Cost Centre","PropertyEmail__c":"property@qic.com","PropertyBillDate__c":"2021-05-31T00:00:00.000Z","AnnualEstimatedTurnover__c":100.0,"GREPropertyShortCode__c":"SHRT","PropertyLongName__c":"LONG","RecordTypeId":"0125m0000004LuVAAU","MRIPropertyID__c":"123456","attributes":{"type":"Property__c","url":"/services/data/v45.0 (40 more) ...","Id":"a2m000000000001AAA"},"PropertyShortName__c":"SHRT","Id":"a2m000000000001AAA","State__c":"QLD"},"attributes":{"type":"ContractDetailCharge (3 more) ...","url":"/services/data/v45.0 (52 more) ...","Id":"a2X000000000012EAA"},"Property__c":"a2m000000000001AAA","Id":"a2X000000000012EAA","EffectiveDate__c":"2021-05-01T00:00:00.000Z","MRIIncomeCategoryCode__c":"1050","Name":"Test Contract Detail (10 more) ..."}]|0x76d7eb6c
    

    Do you parse the whole object?

    If I extract the JSON from that line I get:

    [
      {
        "ContractDetailName__r": {
          "MRIOccupancyStatus__c": "C",
          "Opportunity__r": {
            "TradingName_lu__r": {
              "attributes": {
                "type": "TradingName__c",
                "url": "/services/data/v45.0 (43 more) ...",
                "Id": "a34000000000008AAA"
              },
              "Id": "a34000000000008AAA",
              "Name": "Test Trading Name"
            },
            "Account": {
              "ShippingStateCode": "QLD",
              "SCCABroadCategory__c": "10",
              "TradingNameLookup__r": {
                "attributes": {
                  "type": "TradingName__c",
                  "url": "/services/data/v45.0 (43 more) ...",
                  "Id": "a34000000000010AAA"
                },
                "Id": "a34000000000010AAA",
                "Name": "Test Trading Name"
              },
              "BillingCountryCode": "AU",
              "SCCAFineCategory__c": "1100",
              "Name": "Test Account7",
              "GRETenantEntityID__c": "123",
              "LegalEntity__c": "123",
              "ACN__c": "179240487",
              "SCCASalesCategory__c": "110",
              "RecordTypeId": "0125m0000004Lu8AAE",
              "ShippingCountry": "Australia",
              "GRETenantID__c": "123",
              "GRETenantGroupID__c": "123",
              "IndustryClassification__c": "G - Retail Trade",
              "ABN__c": "24775666134",
              "PropertyName__r": {
                "EntityCode__c": "123ABC456",
                "ManagementType__c": "Full Management",
                "PropertySubtype__c": "Other",
                "GREDivisionCode_P__c": "NBA",
                "PropertyType__c": "Other",
                "GREPropertyID__c": "Nugget123",
                "Name": "Test Property4",
                "CostCentre__c": "Test Cost Centre",
                "PropertyEmail__c": "property@qic.com",
                "AnnualEstimatedTurnover__c": 100.0,
                "GREPropertyShortCode__c": "SHRT",
                "PropertyLongName__c": "LONG",
                "RecordTypeId": "0125m0000004LuVAAU",
                "MRIPropertyID__c": "123456",
                "attributes": {
                  "type": "Property__c",
                  "url": "/services/data/v45.0 (40 more) ...",
                  "Id": "a2m000000000006AAA"
                },
                "PropertyShortName__c": "SHRT",
                "Id": "a2m000000000006AAA",
                "State__c": "QLD"
              },
              "IndustrySubClassification__c": "41 - Food Retailing",
              "ShippingCountryCode": "AU",
              "BillingCountry": "Australia",
              "BillingStateCode": "QLD",
              "TradingNameLookup__c": "a34000000000010AAA",
              "attributes": {
                "type": "Account",
                "url": "/services/data/v45.0 (36 more) ...",
                "Id": "001000000000009AAA"
              },
              "ShippingState": "QLD",
              "Id": "001000000000009AAA",
              "PropertyName__c": "a2m000000000006AAA",
              "GREHoldingGroupID__c": "123",
              "BillingState": "QLD"
            },
            "TenantType__c": "Specialty Retail",
            "AccountId": "001000000000009AAA",
            "StageName": "Commercial Negotiati (2 more) ...",
            "SCCABroadCategory__c": "10",
            "Property__r": {
              "EntityCode__c": "123ABC456",
              "ManagementType__c": "Full Management",
              "PropertySubtype__c": "Other",
              "GREDivisionCode_P__c": "NBA",
              "PropertyType__c": "Other",
              "GREPropertyID__c": "Nugget123",
              "Name": "Test Property4",
              "CostCentre__c": "Test Cost Centre",
              "PropertyEmail__c": "property@qic.com",
              "AnnualEstimatedTurnover__c": 100.0,
              "GREPropertyShortCode__c": "SHRT",
              "PropertyLongName__c": "LONG",
              "RecordTypeId": "0125m0000004LuVAAU",
              "MRIPropertyID__c": "123456",
              "attributes": {
                "type": "Property__c",
                "url": "/services/data/v45.0 (40 more) ...",
                "Id": "a2m000000000006AAA"
              },
              "PropertyShortName__c": "SHRT",
              "Id": "a2m000000000006AAA",
              "State__c": "QLD"
            },
            "SCCAFineCategory__c": "1100",
            "CloseDate": "2022-04-07T00:00:00.000Z",
            "Name": "Test Opportunity5",
            "Site__r": {
              "VirtualSiteStatus__c": "Actual",
              "MRISiteId__c": "TEST08",
              "SiteStartDate__c": "2022-04-07T00:00:00.000Z",
              "IsActive": true,
              "GREPropertyLevel__c": "4",
              "Property__r": {
                "EntityCode__c": "123ABC456",
                "ManagementType__c": "Full Management",
                "PropertySubtype__c": "Other",
                "GREDivisionCode_P__c": "NBA",
                "PropertyType__c": "Other",
                "GREPropertyID__c": "Nugget123",
                "Name": "Test Property4",
                "CostCentre__c": "Test Cost Centre",
                "PropertyEmail__c": "property@qic.com",
                "AnnualEstimatedTurnover__c": 100.0,
                "GREPropertyShortCode__c": "SHRT",
                "PropertyLongName__c": "LONG",
                "RecordTypeId": "0125m0000004LuVAAU",
                "MRIPropertyID__c": "123456",
                "attributes": {
                  "type": "Property__c",
                  "url": "/services/data/v45.0 (40 more) ...",
                  "Id": "a2m000000000006AAA"
                },
                "PropertyShortName__c": "SHRT",
                "Id": "a2m000000000006AAA",
                "State__c": "QLD"
              },
              "attributes": {
                "type": "Product2",
                "url": "/services/data/v45.0 (37 more) ...",
                "Id": "01t000000000005AAA"
              },
              "Property__c": "a2m000000000006AAA",
              "MRISquareFootTypeID__c": "Common Area",
              "Id": "01t000000000005AAA",
              "Name": "Test Site10",
              "AreaUnitOfMeasure__c": "Square Metre"
            },
            "TradingName_lu__c": "a34000000000008AAA",
            "SCCASalesCategory__c": "110",
            "RecordTypeId": "0125m0000004LuTAAU",
            "Site__c": "01t000000000005AAA",
            "attributes": {
              "type": "Opportunity",
              "url": "/services/data/v45.0 (40 more) ...",
              "Id": "006000000000007AAA"
            },
            "Property__c": "a2m000000000006AAA",
            "Id": "006000000000007AAA",
            "SpecialtyTenantType__c": "Non Food"
          },
          "SCCABroadCategory__c": "10",
          "SiteName__c": "01t000000000005AAA",
          "ExpiryDate__c": "2023-04-07T00:00:00.000Z",
          "Property__r": {
            "EntityCode__c": "123ABC456",
            "ManagementType__c": "Full Management",
            "PropertySubtype__c": "Other",
            "GREDivisionCode_P__c": "NBA",
            "PropertyType__c": "Other",
            "GREPropertyID__c": "Nugget123",
            "Name": "Test Property0",
            "CostCentre__c": "Test Cost Centre",
            "PropertyEmail__c": "property@qic.com",
            "PropertyBillDate__c": "2021-05-31T00:00:00.000Z",
            "AnnualEstimatedTurnover__c": 100.0,
            "GREPropertyShortCode__c": "SHRT",
            "PropertyLongName__c": "LONG",
            "RecordTypeId": "0125m0000004LuVAAU",
            "MRIPropertyID__c": "123456",
            "attributes": {
              "type": "Property__c",
              "url": "/services/data/v45.0 (40 more) ...",
              "Id": "a2m000000000001AAA"
            },
            "PropertyShortName__c": "SHRT",
            "Id": "a2m000000000001AAA",
            "State__c": "QLD"
          },
          "Tenant__r": {
            "ShippingStateCode": "QLD",
            "SCCABroadCategory__c": "10",
            "TradingNameLookup__r": {
              "attributes": {
                "type": "TradingName__c",
                "url": "/services/data/v45.0 (43 more) ...",
                "Id": "a34000000000004AAA"
              },
              "Id": "a34000000000004AAA",
              "Name": "Test Trading Name"
            },
            "BillingCountryCode": "AU",
            "SCCAFineCategory__c": "1100",
            "Name": "Test Account11",
            "GRETenantEntityID__c": "123",
            "LegalEntity__c": "123",
            "ACN__c": "187271049",
            "SCCASalesCategory__c": "110",
            "RecordTypeId": "0125m0000004Lu7AAE",
            "ShippingCountry": "Australia",
            "GRETenantID__c": "123",
            "GRETenantGroupID__c": "123",
            "IndustryClassification__c": "G - Retail Trade",
            "ABN__c": "23897726293",
            "IndustrySubClassification__c": "41 - Food Retailing",
            "ShippingCountryCode": "AU",
            "BillingCountry": "Australia",
            "BillingStateCode": "QLD",
            "TradingNameLookup__c": "a34000000000004AAA",
            "attributes": {
              "type": "Account",
              "url": "/services/data/v45.0 (36 more) ...",
              "Id": "001000000000003AAA"
            },
            "ShippingState": "QLD",
            "Id": "001000000000003AAA",
            "GREHoldingGroupID__c": "123",
            "BillingState": "QLD"
          },
          "SCCAFineCategory__c": "1100",
          "Opportunity__c": "006000000000007AAA",
          "Name": "Test Contract Detail (2 more) ...",
          "ContractName__c": "800000000000011AAA",
          "SCCASalesCategory__c": "110",
          "RecordTypeId": "0125m0000004LuJAAU",
          "SiteName__r": {
            "VirtualSiteStatus__c": "Actual",
            "MRISiteId__c": "TEST08",
            "SiteStartDate__c": "2022-04-07T00:00:00.000Z",
            "IsActive": true,
            "GREPropertyLevel__c": "4",
            "Property__r": {
              "EntityCode__c": "123ABC456",
              "ManagementType__c": "Full Management",
              "PropertySubtype__c": "Other",
              "GREDivisionCode_P__c": "NBA",
              "PropertyType__c": "Other",
              "GREPropertyID__c": "Nugget123",
              "Name": "Test Property4",
              "CostCentre__c": "Test Cost Centre",
              "PropertyEmail__c": "property@qic.com",
              "AnnualEstimatedTurnover__c": 100.0,
              "GREPropertyShortCode__c": "SHRT",
              "PropertyLongName__c": "LONG",
              "RecordTypeId": "0125m0000004LuVAAU",
              "MRIPropertyID__c": "123456",
              "attributes": {
                "type": "Property__c",
                "url": "/services/data/v45.0 (40 more) ...",
                "Id": "a2m000000000006AAA"
              },
              "PropertyShortName__c": "SHRT",
              "Id": "a2m000000000006AAA",
              "State__c": "QLD"
            },
            "attributes": {
              "type": "Product2",
              "url": "/services/data/v45.0 (37 more) ...",
              "Id": "01t000000000005AAA"
            },
            "Property__c": "a2m000000000006AAA",
            "MRISquareFootTypeID__c": "Common Area",
            "Id": "01t000000000005AAA",
            "Name": "Test Site10",
            "AreaUnitOfMeasure__c": "Square Metre"
          },
          "attributes": {
            "type": "ContractDetail__c",
            "url": "/services/data/v45.0 (46 more) ...",
            "Id": "a2Z000000000002EAA"
          },
          "Property__c": "a2m000000000001AAA",
          "Id": "a2Z000000000002EAA",
          "Tenant__c": "001000000000003AAA",
          "Status__c": "Active",
          "ContractName__r": {
            "Account": {
              "ShippingStateCode": "QLD",
              "SCCABroadCategory__c": "10",
              "TradingNameLookup__r": {
                "attributes": {
                  "type": "TradingName__c"
                },
                "Id": "a349j00000021BJAAY",
                "Name": "Test Trading Name"
              },
              "BillingCountryCode": "AU",
              "SCCAFineCategory__c": "1100",
              "Name": "Test Account1",
              "GRETenantEntityID__c": "123",
              "LegalEntity__c": "123",
              "ACN__c": "467800488",
              "SCCASalesCategory__c": "110",
              "RecordTypeId": "0125m0000004Lu8AAE",
              "ShippingCountry": "Australia",
              "GRETenantID__c": "123",
              "GRETenantGroupID__c": "123",
              "IndustryClassification__c": "G - Retail Trade",
              "ABN__c": "62424520191",
              "IndustrySubClassification__c": "41 - Food Retailing",
              "ShippingCountryCode": "AU",
              "BillingCountry": "Australia",
              "BillingStateCode": "QLD",
              "TradingNameLookup__c": "a349j00000021BJAAY",
              "attributes": {
                "type": "Account"
              },
              "ShippingState": "QLD",
              "Id": "0019j000000bHgDAAU",
              "GREHoldingGroupID__c": "123",
              "BillingState": "QLD"
            },
            "AccountId": "0019j000000bHgDAAU",
            "Property__r": {
              "EntityCode__c": "123ABC456",
              "ManagementType__c": "Full Management",
              "PropertySubtype__c": "Other",
              "GREDivisionCode_P__c": "NBA",
              "PropertyType__c": "Other",
              "GREPropertyID__c": "Nugget123",
              "Name": "Test Property0",
              "CostCentre__c": "Test Cost Centre",
              "PropertyEmail__c": "property@qic.com",
              "PropertyBillDate__c": "2021-05-31T00:00:00.000Z",
              "AnnualEstimatedTurnover__c": 100.0,
              "GREPropertyShortCode__c": "SHRT",
              "PropertyLongName__c": "LONG",
              "RecordTypeId": "0125m0000004LuVAAU",
              "MRIPropertyID__c": "123456",
              "attributes": {
                "type": "Property__c",
                "url": "/services/data/v45.0 (40 more) ...",
                "Id": "a2m000000000001AAA"
              },
              "PropertyShortName__c": "SHRT",
              "Id": "a2m000000000001AAA",
              "State__c": "QLD"
            },
            "attributes": {
              "type": "Contract",
              "url": "/services/data/v45.0 (37 more) ...",
              "Id": "800000000000011AAA"
            },
            "Property__c": "a2m000000000001AAA",
            "Id": "800000000000011AAA",
            "Name": "Test Contract3"
          }
        },
        "ContractDetailName__c": "a2Z000000000002EAA",
        "Property__r": {
          "EntityCode__c": "123ABC456",
          "ManagementType__c": "Full Management",
          "PropertySubtype__c": "Other",
          "GREDivisionCode_P__c": "NBA",
          "PropertyType__c": "Other",
          "GREPropertyID__c": "Nugget123",
          "Name": "Test Property0",
          "CostCentre__c": "Test Cost Centre",
          "PropertyEmail__c": "property@qic.com",
          "PropertyBillDate__c": "2021-05-31T00:00:00.000Z",
          "AnnualEstimatedTurnover__c": 100.0,
          "GREPropertyShortCode__c": "SHRT",
          "PropertyLongName__c": "LONG",
          "RecordTypeId": "0125m0000004LuVAAU",
          "MRIPropertyID__c": "123456",
          "attributes": {
            "type": "Property__c",
            "url": "/services/data/v45.0 (40 more) ...",
            "Id": "a2m000000000001AAA"
          },
          "PropertyShortName__c": "SHRT",
          "Id": "a2m000000000001AAA",
          "State__c": "QLD"
        },
        "attributes": {
          "type": "ContractDetailCharge (3 more) ...",
          "url": "/services/data/v45.0 (52 more) ...",
          "Id": "a2X000000000012EAA"
        },
        "Property__c": "a2m000000000001AAA",
        "Id": "a2X000000000012EAA",
        "EffectiveDate__c": "2021-05-01T00:00:00.000Z",
        "MRIIncomeCategoryCode__c": "1050",
        "Name": "Test Contract Detail (10 more) ..."
      }
    ]
    

    Which seems all valid but isn’t coming up in the list variable at all?

  9. Scott Wells repo owner

    Okay, I finally know what's going on and have a first version of a fix for this, though I'm not happy with the current fix and have an idea for a better way to accomplish the same goal. Anyway, here's what you should be seeing:

    Issue2075.png

    Hopefully I'll have the actual fix in the next build. I'm not sure if that will be next week as it will be a short week for me, but I'm happy to provide early access to the fix here so you can play with it a bit. I'll let you know when it's ready for additional burn-in.

  10. Scott Wells repo owner

    Okay, here's a build with the fix for this issue and also a couple of performance optimizations that are pretty significant when debugging large logs with large numbers of variables.

    I think you already know the process, but to use this build, download the attached archive but don't extract it, then use Settings/Preferences > Plugins > Install plugin from disk (under the gear drop-down menu). Restart the IDE and you'll be using it.

    Let me know if this doesn't resolve the issue and/or if you see any other issues in this area.

    And thanks for reporting this and providing sufficient diagnostic data to correct it! It was a pretty significant bug in the debugger in terms of being able to visualize more complex nested objects. I'm really surprised no one has reported it previously actually. What's funny is that the issue was just how certain values were being serialized from Map/List-based in-memory JSON objects to string representations...literally a one-line (to be precise, four-line) change.

  11. Justin Julicher reporter

    Grabbed the build and tested - looks great - was debugging another issue and the lack of detail issue presented itself with the old build - gone with this one!

    No thank you Scott! TBH I think 99% of the time the debugger has given me what I needed it was only the other day where I noticed the incorrect Id’s getting assigned and so started this process. I hadn’t really thought - hey is the debugger giving me everything in the object? I also think a lot of people probably just think… oh that’s probably been omitted in the logs.

    Anyway - thanks again for fixing my issue so quickly (sometimes it feels like I get special treatment 🙃 )

    It’s unbelievable how far IC has come. I don’t know how people do their work using VS Code.

    cheers!

  12. Scott Wells repo owner

    Justin, note that I found one issue with the version of the fix included in the attached build where, if a variable value's overall object graph includes cycles, you'd see StackOverflowErrors. I've fixed that locally for when this change is included in the official build.

    And I'm not sure if you're getting special treatment as much as you're logging some bugs which IMO have a more significant impact and you're providing solid diagnostic information to help diagnose/fix those bugs. Those two go a loooonnnnng way in terms of driving responsiveness.

  13. Log in to comment