Query All Private Reports in Salesforce
Biswajeet
November 14, 2017 No Comments on Query All Private Reports in Salesforce
Here is the query to get all private reports in Salesforce.
SELECT Id, Name, Owner.Name FROM Report USING SCOPE allPrivate
Find How Many Records an User Created Across All Objects in Salesforce
Show required symbol in apex:inputText
Biswajeet
November 14, 2017 No Comments on Show required symbol in apex:inputText
Controller:
public with sharing class Sample { public String name {Get;set;} public Sample() { } }
Visualforce Page:
<apex:page controller="Sample"> <apex:form > <apex:pageBlock > <apex:pageBlockSection > <apex:pageBlockSectionItem > <apex:outputLabel value="Name"/> <apex:outputPanel styleClass="requiredInput" layout="block" > <apex:outputPanel styleClass="requiredBlock" layout="block"/> <apex:inputText value="{!name}" required="true"/> </apex:outputpanel> </apex:pageBlockSectionItem> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page>
Redirect to Record Detail Page From Visualforce Page in Salesforce Console
public PageReference redirect() { String id = ApexPages.currentPage().getParameters().get('id'); PageReference pgRef = new PageReference('salesforce_url/console#%2F' + id); return pgRef; }