FavoritRakesh Mallikarjun (Bit Order Technologies) fragte in #CRM Configuration27. Feb. 2021, 14:16Return type of an Apex action method must be a PageReference. Found: core.apexpages.el.adapters.ApexListELAdapterpublic class WorkBenchControllerClass { public String obj; public List<String> objFields {get;set;} public WorkBenchControllerClass() { } public String getobj() { return obj; } public void setobj(String obj) { this.obj = obj; } //Fetching Sobjectspublic List<SelectOption> getobjectnames(){ Map <String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe(); System.debug('globaldesc values--> '+schemaMap); List<SelectOption> options=new List<SelectOption>(); options.add(new SelectOption('None','None')); for(Schema.SObjectType objType : schemaMap.values()) { options.add(new SelectOption(objType.getDescribe().getName(),objType.getDescribe().getName())); } return options;} //Fetching Fields public List<SelectOption> fetchFields() { List<SelectOption> allfields=new List<SelectOption>(); List<String> fields = new List<String>(); Map<String , Schema.SObjectType> globalDescription = Schema.getGlobalDescribe(); System.debug('Selected Object is ' + obj); Schema.sObjectType objType = globalDescription.get(obj); System.debug('Object Type is ' + objType); Schema.DescribeSObjectResult r1 = objType.getDescribe(); Map<String , Schema.SObjectField> mapFieldList = r1.fields.getMap(); for(Schema.SObjectField field : mapFieldList.values()) { Schema.DescribeFieldResult fieldResult = field.getDescribe(); if(fieldResult.isAccessible()) { System.debug('Field Name is ' + fieldResult.getName()); //fields.add(fieldResult.getName()); allfields.add(new SelectOption(fieldResult.getName(),fieldResult.getName())); } } return allfields; } }I Tried PageReference also but its not working because.it should return list of fields.Please Help Me to fix this errorMehr anzeigen3 AntwortenSortierenNach Datum sortierenNach "Am hilfreichsten" sortierenNach Datum sortierenMehr Kommentare laden...Rakesh Mallikarjun (Bit Order Technologies)27. Feb. 2021, 14:39yes it shoud display picklist (all the fields) in the visualforceKommentar hinzufügenAntwort schreiben...FettKursivUnterstreichenDurchstreichenListe mit GliederungspunktenNummerierte ListeLink hinzufügenCodeblockBild einfügenDateien anhängenLink-URLAbbrechenSpeichern0/9000Antworten
Rakesh Mallikarjun (Bit Order Technologies)27. Feb. 2021, 14:39yes it shoud display picklist (all the fields) in the visualforce