I am trying to do show dependent property in app builder when component drag and drop.


Invalid Class datarow at line 4 Dynamic picklist class VisualEditor.DataRow class showing error Invalid calss dataerror


global class MyCustomPickList extends VisualEditor.DynamicPickList{

    global override VisualEditor.DataRow getDefaultValue(){
        VisualEditor.DataRow defaultValue = new VisualEditor.DataRow('red', 'RED');
        return defaultValue;
    global override VisualEditor.DynamicPickListRows getValues() {
        VisualEditor.DataRow value1 = new VisualEditor.DataRow('red', 'RED');
        VisualEditor.DataRow value2 = new VisualEditor.DataRow('yellow', 'YELLOW');
        VisualEditor.DynamicPickListRows  myValues = new VisualEditor.DynamicPickListRows();
        return myValues;

Spring '17 (API version 39.0) is when the VisualEditor namespace became available.

It is not there in Winter '17 (API version 38.0) or before.

Try checking your Salesforce instance's API version.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.