You need to sign in to do that
Don't have an account?
RarLopz
Unknown Property: VisualforceArrayList
Save error: Unknown property 'VisualforceArrayList.caPerformanceRecordList' I am trying to create a VFP to display a table with values from a JSONWrapperController Class. <apex:page controller="CASReportController"> <apex:form > <apex:pageBlock title="JSON Deserialized Response"> <apex:pageBlockButtons > <apex:commandButton value="submit" action="{!deserialize}" reRender="dealerBlock"/> </apex:pageBlockButtons> <apex:pageBlockSection id="DealerBlock" columns="1"> <apex:repeat value="{!wrapper.caPerformanceRecordList}" var="cap"> <apex:pageBlockSection columns="2"> <apex:facet name="header">Dealer Name {!cap.dealerName}</apex:facet> <apex:pageBlockSectionItem > <apex:outputLabel value="Dealer Id" for="dlrid" /> <apex:outputText value="{!cap.motorDealerID}" id="dlrid" /> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem > <apex:outputLabel value="Reporting Date " for="rptdt" /> <apex:outputText value="{!cap.statementDate}" id="rptdt" /> </apex:pageBlockSectionItem> </apex:pageBlockSection> </apex:repeat> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page> ================================== Related components for this visualforce page This is a snapshot of the actual JSON Response from Endpoint as obtained from Postman: { "caPerformanceRecordList": [ { "motorDealerID": "XL1HX", "dealerName": "Subaru Auto Dealer", "reportingPeriod": "2019-05-18", "financeSourceIntegrationTypeCode": "FIFS", "idlPlus": "Y", "creditApplicationSourceCode": "STEONE", "submissionCount": 2 }, { "motorDealerID": "XL1HX", "dealerName": "Subaru Auto Dealer", "reportingPeriod": "2019-06-27", "financeSourceIntegrationTypeCode": "FIFS", "idlPlus": "Y", "creditApplicationSourceCode": "STEONE", "submissionCount": 5 } ], "ecPerformanceRecordList": [ { "motorDealerID": "XL1HX", "submitUserID": "BCUSER1", "bookedDate": "2019-05-22 00:00:00.0", "ecEligible": "Y", "caBookedCount": 1, "ecBookedCount": 0 }, { "motorDealerID": "XL1HX", "submitUserID": "BCUSER1", "bookedDate": "2019-06-05 00:00:00.0", "ecEligible": "Y", "caBookedCount": 1, "ecBookedCount": 0 } ] } ========================================================= public with sharing class CASReportController { @AuraEnabled public list<JSONWrapperController> wrapper {get;set;} public void deserialize() { try{ string jsonresponse = '[{ "caPerformanceRecordList": [ { "motorDealerID": "XL1HX", "dealerName": "Subaru Auto Dealer", "reportingPeriod": "2019-05-18", "financeSourceIntegrationTypeCode": "FIFS", "idlPlus": "Y", "creditApplicationSourceCode": "STEONE", "submissionCount": 2 }, { "motorDealerID": "XL1HX", "dealerName": "Subaru Auto Dealer", "reportingPeriod": "2019-06-27", "financeSourceIntegrationTypeCode": "FIFS", "idlPlus": "Y", "creditApplicationSourceCode": "STEONE", "submissionCount": 5 } ], "ecPerformanceRecordList": [ { "motorDealerID": "XL1HX", "submitUserID": "BCUSER1", "bookedDate": "2019-05-22 00:00:00.0", "ecEligible": "Y", "caBookedCount": 1, "ecBookedCount": 0 }, { "motorDealerID": "XL1HX", "submitUserID": "BCUSER1", "bookedDate": "2019-06-05 00:00:00.0", "ecEligible": "Y", "caBookedCount": 1, "ecBookedCount": 0 } ] }]'; system.debug('json string is ' +jsonresponse); wrapper = (list<JSONWrapperController>) JSON.deserialize(jsonresponse, list<JSONWrapperController>.class); system.debug('This is the wrapper class: ' +wrapper); } catch (Exception e){ system.debug('Error---->' + e.getLineNumber() + e.getMessage()); } } } ======================================== public class JSONWrapperController { public List<CaPerformanceRecordList> caPerformanceRecordList{get;set;} public List<EcPerformanceRecordList> ecPerformanceRecordList{get;set;} public class EcPerformanceRecordList { public String motorDealerID{get;set;} public String submitUserID{get;set;} public String bookedDate{get;set;} public String ecEligible{get;set;} public Integer caBookedCount{get;set;} public Integer ecBookedCount{get;set;} } public class CaPerformanceRecordList { public String motorDealerID{get;set;} public String dealerName{get;set;} public String reportingPeriod{get;set;} public String financeSourceIntegrationTypeCode{get;set;} public String idlPlus{get;set;} public String creditApplicationSourceCode; {get;set;}public Integer submissionCount; } }
- I read your problem and implemented it in my Org and it is working fine.
- Please use the below code [Solved] : -
--------------VF Page------------------
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha.
All Answers
@AuraEnabled must be duplicated for each property that you want to expose.
https://developer.salesforce.com/docs/atlas.en-us.220.0.lightning.meta/lightning/controllers_server_apex_pass_data.htm
- I read your problem and implemented it in my Org and it is working fine.
- Please use the below code [Solved] : -
--------------VF Page------------------
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha.
Deepali, Truly appreciate your help. I promise to pay it forward.