function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Wei Cheng Hsu 9Wei Cheng Hsu 9 

Make JSON response can have __c __r in the suffix for the keys.

Make JSON response can have __c __r in the suffix for the keys.

My expecting JSON response is

    {
        name: "test",
        Parties__c: {
            ~~~
        },
        Queue__c: {
            ~~~
        }
    }

However I got `Incompatible types since an instance of Id is never an instance of Queue__c`

I know I could not have "__c", "__r" as variable names.

But I have to. Please give me some ideas to workaround this situation.

Thanks

        global class SearchResponse {
            public PartyField Parties__c;
            public QueueContract Queue__c;
            ....