Category: Salesforce
How to get Product Name from Opportunity Line item in SOQL?
Sample Query: SELECT PricebookEntry.Product2.Name FROM OpportunityLineItem (Or) SELECT PricebookEntry.Name FROM OpportunityLineItem LIMIT 10 Sample Code: for ( OpportunityLineItem OLI : [ SELECT PricebookEntry.Product2.Name, PricebookEntry.Name FROM OpportunityLineItem LIMIT 10 ] ) ....
How to get Product Id from Opportunity Line item in SOQL?
Sample Query: SELECT PricebookEntry.Product2Id FROM OpportunityLineItem PricebookEntry.Product2Id will give you the Product Id associated with that Opportunity Product(Opportunity Line Item). If the above workaround didn't help you to fix the ....
How to get Account Name from Contact in SOQL?
Sample Query: SELECT Id, Name, Account.Name FROM Contact
How to create a web tab in Salesforce?
1. Go to Setup --> Create --> Tabs and click new button under Web tabs. 2. Select the tab layout and click "Next" button. 3. Enter the required details and click ....
How to create a visualforce tab in Salesforce?
1. Go to Setup --> App Setup --> Create --> Tabs and click new button under visualforce tabs. 2. Select the visualforce page to which you want to create the ....
Historical Trend Reporting in Salesforce
Historical Trend Reporting in Salesforce is used to capture historical data of Opportunity and upto 3 custom objects for the last 3 months. Follow the below steps to setup Historical Trend ....
How to count distinct values of field from an object in Salesforce?
Count_Distinct() is used to find the number of distinct non-null field values as mentioned in the query criteria. Sample Query: SELECT COUNT_DISTINCT(City__c) TotalCities FROM Employee__c Below is the output of ....
How to change report criteria dynamically in Salesforce?
To change report criteria dynamically in Salesforce, we have to pass the filter criteria in the URL. Follow the below steps to change report criteria dynamically in Salesforce 1. Create a ....