-
ChatterFeed
-
0Best Answers
-
2Likes Received
-
0Likes Given
-
3Questions
-
2Replies
Apex how to check view is Salesforce Classic or Lightning.
Hi,
How i can check on controller if page is opened using 'Salesforce Classic' or 'Salesforce lightning' UI(for winter 16 release).
Thanks,
Kanwalpreet Singh
How i can check on controller if page is opened using 'Salesforce Classic' or 'Salesforce lightning' UI(for winter 16 release).
Thanks,
Kanwalpreet Singh
- Kanwalpreet Singh
- September 01, 2015
- Like
- 2
- Continue reading or reply
Minimum permissions to query 'Organisation' object.
What are the minimum required permissions to query 'Organisation' object using apex. Is it available to all internal users by default.
- Kanwalpreet Singh
- August 24, 2015
- Like
- 0
- Continue reading or reply
When will be Winter 16 release notes available
When will be Winter 16 release notes available
- Kanwalpreet Singh
- August 14, 2015
- Like
- 0
- Continue reading or reply
Apex how to check view is Salesforce Classic or Lightning.
Hi,
How i can check on controller if page is opened using 'Salesforce Classic' or 'Salesforce lightning' UI(for winter 16 release).
Thanks,
Kanwalpreet Singh
How i can check on controller if page is opened using 'Salesforce Classic' or 'Salesforce lightning' UI(for winter 16 release).
Thanks,
Kanwalpreet Singh
- Kanwalpreet Singh
- September 01, 2015
- Like
- 2
- Continue reading or reply
How to restrict few users not to see records while OWD access level is public?
Hi,
!)If OWD access level is public for Object, there is a client requirement to restrict few users not to see records. so how we can restrict?
2)if OWD access level is private for Object, there is a client requirement to restrict few users not to see records. so how we can restrict?
please help me with solution for above two scenarios....
Thanks in advance
Thulasi
!)If OWD access level is public for Object, there is a client requirement to restrict few users not to see records. so how we can restrict?
2)if OWD access level is private for Object, there is a client requirement to restrict few users not to see records. so how we can restrict?
please help me with solution for above two scenarios....
Thanks in advance
Thulasi
- B Tulasi
- August 23, 2015
- Like
- 0
- Continue reading or reply
Running Reports from Apex in System context when Scheduled Batch runs
I create some reports in my org .
I wrote a batch that retrieves accounts from reports using Report Apex API and does some calculations.
My Reports have filters , when i run batch from user context clicking on a link that i created , i get right results , only filtered records but when batch runs in system context as scheduledbatch somehow a lot of records are retrieved as if filters have no affect , does someone have an idea how i can get only filtered results when batch runs from system context
I wrote a batch that retrieves accounts from reports using Report Apex API and does some calculations.
My Reports have filters , when i run batch from user context clicking on a link that i created , i get right results , only filtered records but when batch runs in system context as scheduledbatch somehow a lot of records are retrieved as if filters have no affect , does someone have an idea how i can get only filtered results when batch runs from system context
results = Reports.ReportManager.runReport(currentHeatScoreSet.Report_Id__c, true); System.debug(' HeatScoreCalc=>start ' + results); Reports.ReportDescribeResult describe = Reports.ReportManager.describeReport(currentHeatScoreSet.Report_Id__c); Reports.ReportMetadata reportMd = describe.getReportMetadata(); Reports.StandardDateFilter standardDateFilter = reportMd.getStandardDateFilter(); Reports.ReportFactWithDetails factDetails; try{ factDetails =(Reports.ReportFactWithDetails) results.getFactMap().get('T!T'); }catch(Exception exp){ exp.setMessage('HeatScoreCalc=> HeatScoreCalc:error retrieving fact map\n' +exp.getMessage()); Log.writeError(exp, true); } System.debug('fact details ' + factDetails); Reports.ReportMetadata metaData; try{ metaData= results.getReportMetadata(); }catch(Exception exp){ exp.setMessage('HeatScoreCalc=> HeatScoreCalc:error retrieving metadate\n' +exp.getMessage()); Log.writeError(exp, true); } System.debug('HeatScoreCalc=>metadata '+ metaData); LIST<String> detailsColumnsAPINames = metaData.getDetailColumns(); Integer index=0; Boolean found = false; for(Integer i=0;i<detailsColumnsAPINames.size();i++){ if(detailsColumnsAPINames.get(i).equals( currentHeatScoreSet.target_Id_field__c)){ found= true; break; } index++; } System.debug('HeatScoreCalc=> column number ' + index); objectIds = new List<String>(); if(found==true){ for(Reports.ReportDetailRow row: factDetails.getRows()){ List<Reports.ReportDataCell> cells =row.getDataCells(); if(cells!=null && cells.size()!=0){ Reports.ReportDataCell cell = cells.get(index); objectIds.add((String) cell.getValue()); } } }else{ HeatScoreException exp = new HeatScoreException(); exp.setMessage('HeatScoreCalc=>HeatScoreCalc:Cant find in the report with id ' +currentHeatScoreSet.Report_Id__c+' field id name ' + currentHeatScoreSet.target_Id_field__c); Log.writeError(exp, true); System.debug('HeatScoreCalc=>unrecognizable field ' + found); }
- Maria Sigal
- August 21, 2015
- Like
- 0
- Continue reading or reply