1

We have a custom Lightning Component which pulls back the IsClosed field from an Apex Controller for a Customer Community Plus user. We are selecting the record via SOQL and returning back to the Lightning Component but when we try to access it, the value is undefined:

// x is undefined
var x = caseRec.isClosed;

Checking user profiles, there doesn't appear to be a way to set access to this field.

Is there any way to expose this field to a Customer Community Plus user, or a work-around if not?

1
  • That is it! Thank you. Please post as answer so I can accept. Commented Apr 4, 2019 at 19:41

1 Answer 1

0

Based on my observations, if you return field values from SOQL from an Apex method, the first letter of the field names are always serialized in UPPERCASE. So in your case, using it as caseRec.IsClosed should work.

So if you have a SOQL written in apex as say:

@AuraEnabled
public static List<Case> getMyCases() {

    return [SELECT isClosed FROM CASE];
}

To access the field value in JS or Component, you will always want to use the field value as IsClosed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .