How to make apex:pageblock background white?

Syntax:

<apex:pageblock mode="maindetail">

Example:

Visualforce page:

<apex:page controller="Sample" sidebar="false" >
<style type="text/css">
    .hideButton{display:none;}
</style>
<chatter:feedWithFollowers entityId="{!contactDetail.Id}"/><apex:form >   
    <apex:pageblock title="Contact Detail" mode="maindetail">
        <apex:pageblockSection columns="4" >
            <apex:pageblockSectionItem >
                Contact First Name:
            </apex:pageblockSectionItem> 
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.FirstName}">
                    <apex:inlineEditSupport event="ondblclick" showOnEdit="Save,Cancel" hideOnEdit="Edit"/>
                </apex:outputField>
            </apex:pageblockSectionItem>   
            <apex:pageblockSectionItem >
                Contact Email:
            </apex:pageblockSectionItem> 
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.Email}">
                    <apex:inlineEditSupport event="ondblclick" showOnEdit="Save,Cancel" hideOnEdit="Edit"/>
                </apex:outputField>               
            </apex:pageblockSectionItem>  
            <apex:pageblockSectionItem >
                Contact Last Name:
            </apex:pageblockSectionItem> 
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.LastName}">
                    <apex:inlineEditSupport event="ondblclick" showOnEdit="Save,Cancel" hideOnEdit="Edit"/>
                </apex:outputField>               
            </apex:pageblockSectionItem>             
            <apex:pageblockSectionItem >
                Contact Mobile Number:
            </apex:pageblockSectionItem> 
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.MobilePhone}">
                    <apex:inlineEditSupport event="ondblclick" showOnEdit="Save,Cancel" hideOnEdit="Edit"/>
                </apex:outputField>               
            </apex:pageblockSectionItem>  
            <apex:pageblockSectionItem >
                Account:
            </apex:pageblockSectionItem> 
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.AccountId}">
                    <apex:inlineEditSupport event="ondblclick" showOnEdit="Save,Cancel" hideOnEdit="Edit"/>
                </apex:outputField>               
            </apex:pageblockSectionItem>                        
            <apex:pageblockSectionItem >
                Contact Phone Number:
            </apex:pageblockSectionItem> 
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.Phone}">
                    <apex:inlineEditSupport event="ondblclick" showOnEdit="Save,Cancel" hideOnEdit="Edit"/>
                </apex:outputField>               
            </apex:pageblockSectionItem>
            <apex:pageblockSectionItem >
                Department:
            </apex:pageblockSectionItem> 
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.Department}">
                    <apex:inlineEditSupport event="ondblclick" showOnEdit="Save,Cancel" hideOnEdit="Edit"/>
                </apex:outputField>               
            </apex:pageblockSectionItem>            
            <apex:pageblockSectionItem >
                Other Phone:
            </apex:pageblockSectionItem> 
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.OtherPhone}">
                    <apex:inlineEditSupport event="ondblclick" showOnEdit="Save,Cancel" hideOnEdit="Edit"/>
                </apex:outputField>               
            </apex:pageblockSectionItem>   
            <apex:pageblockSectionItem >
                Description:
            </apex:pageblockSectionItem> 
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.Description}">
                    <apex:inlineEditSupport event="ondblclick" showOnEdit="Save,Cancel" hideOnEdit="Edit"/>
                </apex:outputField>               
            </apex:pageblockSectionItem>                                 
            <apex:pageblockSectionItem >
                Fax:
            </apex:pageblockSectionItem> 
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.Fax}">
                    <apex:inlineEditSupport event="ondblclick" showOnEdit="Save,Cancel" hideOnEdit="Edit"/>
                </apex:outputField>                            </apex:pageblockSectionItem>                                                                                                                                      
        </apex:pageblockSection> 
        <apex:pageBlockSection title="System Information" columns="4" >
            <apex:pageblockSectionItem >
                Created By
            </apex:pageblockSectionItem>
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.CreatedById}"/>
            </apex:pageblockSectionItem>
            <apex:pageblockSectionItem >
                Last Modified By
            </apex:pageblockSectionItem>
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.LastModifiedById}"/>
            </apex:pageblockSectionItem>           
        </apex:pageBlockSection>     
        <apex:pageblockButtons >
            <apex:commandButton value="Edit" id="Edit" action="{!Editcontact}"/>
            <apex:commandButton value="Save" id="Save" styleClass="hideButton" action="{!updateContact}" />
            <apex:commandButton value="Cancel" id="Cancel" styleClass="hideButton"/>
        </apex:pageblockButtons>       
    </apex:pageblock>
</apex:form>
</apex:page>


Apex Controller:

public class Sample
{  
    public Contact contactDetail {get;set;}
    public Id contactId = '0039000000PsPW6';
    public sample()
    {
        contactDetail = [SELECT Id, LastName, FirstName, AccountId, Email, MobilePhone, Phone, Department, Fax, ReportsTo.Name, OtherPhone, Description, CreatedById, LastModifiedById FROM Contact WHERE Id =: contactId ];
    } 
    public void editContact()
    {
    }
    public void updateContact()
    {
        update contactDetail;
    }
}


Output:


How to display chatter for a record in Visualforce page in Salesforce?

Syntax:

<chatter:feedWithFollowers entityId="Id of the record"/>

Example:

Visualforce page:

<apex:page controller="Sample" sidebar="false" >
<style type="text/css">
    .hideButton{display:none;}
</style>
<chatter:feedWithFollowers entityId="{!contactDetail.Id}"/>
<apex:form >   
    <apex:pageblock title="Contact Detail" mode="inlineEdit">
        <apex:pageblockSection columns="4" >
            <apex:pageblockSectionItem >
                Contact First Name:
            </apex:pageblockSectionItem> 
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.FirstName}">
                    <apex:inlineEditSupport event="ondblclick" showOnEdit="Save,Cancel" hideOnEdit="Edit"/>
                </apex:outputField>
            </apex:pageblockSectionItem>   
            <apex:pageblockSectionItem >
                Contact Email:
            </apex:pageblockSectionItem> 
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.Email}">
                    <apex:inlineEditSupport event="ondblclick" showOnEdit="Save,Cancel" hideOnEdit="Edit"/>
                </apex:outputField>               
            </apex:pageblockSectionItem>  
            <apex:pageblockSectionItem >
                Contact Last Name:
            </apex:pageblockSectionItem> 
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.LastName}">
                    <apex:inlineEditSupport event="ondblclick" showOnEdit="Save,Cancel" hideOnEdit="Edit"/>
                </apex:outputField>               
            </apex:pageblockSectionItem>             
            <apex:pageblockSectionItem >
                Contact Mobile Number:
            </apex:pageblockSectionItem> 
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.MobilePhone}">
                    <apex:inlineEditSupport event="ondblclick" showOnEdit="Save,Cancel" hideOnEdit="Edit"/>
                </apex:outputField>               
            </apex:pageblockSectionItem>  
            <apex:pageblockSectionItem >
                Account:
            </apex:pageblockSectionItem> 
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.AccountId}">
                    <apex:inlineEditSupport event="ondblclick" showOnEdit="Save,Cancel" hideOnEdit="Edit"/>
                </apex:outputField>               
            </apex:pageblockSectionItem>                        
            <apex:pageblockSectionItem >
                Contact Phone Number:
            </apex:pageblockSectionItem> 
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.Phone}">
                    <apex:inlineEditSupport event="ondblclick" showOnEdit="Save,Cancel" hideOnEdit="Edit"/>
                </apex:outputField>               
            </apex:pageblockSectionItem>
            <apex:pageblockSectionItem >
                Department:
            </apex:pageblockSectionItem> 
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.Department}">
                    <apex:inlineEditSupport event="ondblclick" showOnEdit="Save,Cancel" hideOnEdit="Edit"/>
                </apex:outputField>               
            </apex:pageblockSectionItem>            
            <apex:pageblockSectionItem >
                Other Phone:
            </apex:pageblockSectionItem> 
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.OtherPhone}">
                    <apex:inlineEditSupport event="ondblclick" showOnEdit="Save,Cancel" hideOnEdit="Edit"/>
                </apex:outputField>               
            </apex:pageblockSectionItem>   
            <apex:pageblockSectionItem >
                Description:
            </apex:pageblockSectionItem> 
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.Description}">
                    <apex:inlineEditSupport event="ondblclick" showOnEdit="Save,Cancel" hideOnEdit="Edit"/>
                </apex:outputField>               
            </apex:pageblockSectionItem>                                 
            <apex:pageblockSectionItem >
                Fax:
            </apex:pageblockSectionItem> 
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.Fax}">
                    <apex:inlineEditSupport event="ondblclick" showOnEdit="Save,Cancel" hideOnEdit="Edit"/>
                </apex:outputField>                                   </apex:pageblockSectionItem>                                                                                                                                      
        </apex:pageblockSection> 
        <apex:pageBlockSection title="System Information" columns="4" >
            <apex:pageblockSectionItem >
                Created By
            </apex:pageblockSectionItem>
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.CreatedById}"/>
            </apex:pageblockSectionItem>
            <apex:pageblockSectionItem >
                Last Modified By
            </apex:pageblockSectionItem>
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.LastModifiedById}"/>
            </apex:pageblockSectionItem>           
        </apex:pageBlockSection>     
        <apex:pageblockButtons >
            <apex:commandButton value="Edit" id="Edit" action="{!Editcontact}"/>
            <apex:commandButton value="Save" id="Save" styleClass="hideButton" action="{!updateContact}" />
            <apex:commandButton value="Cancel" id="Cancel" styleClass="hideButton"/>
        </apex:pageblockButtons>       
    </apex:pageblock>
</apex:form>
</apex:page>



Apex Controller:

public class Sample
{  
    public Contact contactDetail {get;set;}
    public Id contactId = '0039000000PsPW6';
    public sample()
    {
        contactDetail = [SELECT Id, LastName, FirstName, AccountId, Email, MobilePhone, Phone, Department, Fax, ReportsTo.Name, OtherPhone, Description, CreatedById, LastModifiedById FROM Contact WHERE Id =: contactId ];
    } 
    public void editContact()
    {
    }
    public void updateContact()
    {
        update contactDetail;
    }
}


Output:



How to show lookup field in apex:outputfield in Salesforce?

Sample Code:

Visualforce page:

<apex:page controller="Sample" sidebar="false" >
<style type="text/css">
    .hideButton{display:none;}
</style>
<apex:form >   
    <apex:pageblock title="Contact Detail" mode="inlineEdit">
        <apex:pageblockSection columns="4" >
            <apex:pageblockSectionItem >
                Contact First Name:
            </apex:pageblockSectionItem> 
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.FirstName}">
                    <apex:inlineEditSupport event="ondblclick" showOnEdit="Save,Cancel" hideOnEdit="Edit"/>
                </apex:outputField>
            </apex:pageblockSectionItem>   
            <apex:pageblockSectionItem >
                Contact Email:
            </apex:pageblockSectionItem> 
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.Email}">
                    <apex:inlineEditSupport event="ondblclick" showOnEdit="Save,Cancel" hideOnEdit="Edit"/>
                </apex:outputField>               
            </apex:pageblockSectionItem>  
            <apex:pageblockSectionItem >
                Contact Last Name:
            </apex:pageblockSectionItem> 
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.LastName}">
                    <apex:inlineEditSupport event="ondblclick" showOnEdit="Save,Cancel" hideOnEdit="Edit"/>
                </apex:outputField>               
            </apex:pageblockSectionItem>             
            <apex:pageblockSectionItem >
                Contact Mobile Number:
            </apex:pageblockSectionItem> 
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.MobilePhone}">
                    <apex:inlineEditSupport event="ondblclick" showOnEdit="Save,Cancel" hideOnEdit="Edit"/>
                </apex:outputField>               
            </apex:pageblockSectionItem>  
            <apex:pageblockSectionItem >
                Account:
            </apex:pageblockSectionItem> 
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.AccountId}">
                    <apex:inlineEditSupport event="ondblclick" showOnEdit="Save,Cancel" hideOnEdit="Edit"/>
                </apex:outputField>               
            </apex:pageblockSectionItem>                        
            <apex:pageblockSectionItem >
                Contact Phone Number:
            </apex:pageblockSectionItem> 
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.Phone}">
                    <apex:inlineEditSupport event="ondblclick" showOnEdit="Save,Cancel" hideOnEdit="Edit"/>
                </apex:outputField>               
            </apex:pageblockSectionItem>
            <apex:pageblockSectionItem >
                Department:
            </apex:pageblockSectionItem> 
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.Department}">
                    <apex:inlineEditSupport event="ondblclick" showOnEdit="Save,Cancel" hideOnEdit="Edit"/>
                </apex:outputField>               
            </apex:pageblockSectionItem>            
            <apex:pageblockSectionItem >
                Other Phone:
            </apex:pageblockSectionItem> 
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.OtherPhone}">
                    <apex:inlineEditSupport event="ondblclick" showOnEdit="Save,Cancel" hideOnEdit="Edit"/>
                </apex:outputField>               
            </apex:pageblockSectionItem>   
            <apex:pageblockSectionItem >
                Description:
            </apex:pageblockSectionItem> 
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.Description}">
                    <apex:inlineEditSupport event="ondblclick" showOnEdit="Save,Cancel" hideOnEdit="Edit"/>
                </apex:outputField>               
            </apex:pageblockSectionItem>                                 
            <apex:pageblockSectionItem >
                Fax:
            </apex:pageblockSectionItem> 
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.Fax}">
                    <apex:inlineEditSupport event="ondblclick" showOnEdit="Save,Cancel" hideOnEdit="Edit"/>
                </apex:outputField>               
            </apex:pageblockSectionItem>                                                                                                                                      
        </apex:pageblockSection> 
        <apex:pageBlockSection title="System Information" columns="4" >
            <apex:pageblockSectionItem >
                Created By
            </apex:pageblockSectionItem>
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.CreatedById}"/>
            </apex:pageblockSectionItem>
            <apex:pageblockSectionItem >
                Last Modified By
            </apex:pageblockSectionItem>
            <apex:pageblockSectionItem >
                <apex:outputField value="{!contactDetail.LastModifiedById}"/>
            </apex:pageblockSectionItem>           
        </apex:pageBlockSection>     
        <apex:pageblockButtons >
            <apex:commandButton value="Edit" id="Edit" action="{!Editcontact}"/>
            <apex:commandButton value="Save" id="Save" styleClass="hideButton" action="{!updateContact}" />
            <apex:commandButton value="Cancel" id="Cancel" styleClass="hideButton"/>
        </apex:pageblockButtons>       
    </apex:pageblock>
</apex:form>
</apex:page>


Apex Controller:

public class Sample
{  
    public Contact contactDetail {get;set;}
    public sample()
    {
        contactDetail = [SELECT Id, LastName, FirstName, AccountId, Email, MobilePhone, Phone, Department, Fax, ReportsTo.Name, OtherPhone, Description, CreatedById, LastModifiedById FROM Contact WHERE Id = '0039000000PsPW6'];
    } 
    public void editContact()
    {
    }
    public void updateContact()
    {
        update contactDetail;
    }
}


Output:



Salesforce Interview questions with answers Part 17

1. What are set up and non set up Objects in salesforce?

Non-Setup objects are standard objects like Account or any custom object.

Setup objects are Group1, GroupMember, QueueSObject, User2, UserRole, UserTerritory, Territory, etc..


2. How do you serialize batch apex?Explain the various methods?


http://devendranatani.blogspot.in/2011/03/serialize-batch-apex-in-salesforce.html

3. What is the minimum time you can schedule a batch apex?

Minute

4. What happens if sharing on Case is Read write ? How does it impact on account, contact and opportunity sharing in OWD?

No impact because of Lookup relationshipt among all these objects.

5. What is the significance of iscallout = true in salesforce ?

To execute web services methods asynchronously.

6. Can we update parent object records by having workflow on Child Object ?

 
Yes.

What is the use of List View in Salesforce?

1. We can filter records

2. We can Edit the record



3. We can print from the list


Cheers!!!

Difference between Contact and Contact Role in Salesforce

Contact: 

People who work for your Customers, Affiliates or Prospects.


Contact Role:  

A contact role defines the part that a contact or person account plays in a specific account, case, contract, or opportunity. The Contact Roles related list of an account, case, contract, or opportunity displays the roles that each contact or person account plays in that record.

Test Class for Static Method in Apex in Salesforce

Sample Test Class:

@isTest
private class testClass
{
    static testMethod void test()
    {
        Member__c m = new Member__c();
        m.Name = 'Sample';
        m.Email_Address__c = '
Your email address';
        m.Age__c = 25;
        insert m;
        memberApproval.callApproval(m.Id);
    }
}


here memberApproval is an Apex class and callApproval is a static method.

To call a static method in a test class, we have to use class name instead of object of that class.

Cheers!!!

Existing CRMs

  1. Siebel CRM
  2. Oracle CRM
  3. Clarify CRM
  4. Chordiant CRM
  5. Clarity CRM
  6. Mircrosoft Dynamics CRM
  7. Salesforce.com CRM
  8. Veeva CRM
  9. Zoho CRM
  10. Sophos CRM
  11. Vtiger CRM
Cheers!!!

Salesforce Interview questions with answers Part 16

1. Where and why exactly we go for for data loader?

    a. If a person leaves a company, we can transfer his/records to others using data loader.
    b. If we want to add products for multiple currencies, we go for data loader.
    c. If we want to delete the test data, we go for data loader.
    d. If we want to handle more than 50000 records.
    3. For moving reports, dashboards, attachments from Sandbox to Production.
   
2. How much time will it take for loading contacts,leads,accounts,opportunities etc?Which one will get more time for loading?

It is based on the triggers, validation rules, etc behind the objects.

Usually it will take more time on Opportunity.


3. what are the most common problems you faced in loading data?

    a. Uploading multilanguage data.
    b. Fault string error.

4. Why exactly the batch apex is used in your project?


    a. Background process
    b. Reminder settings
    c. Daily or weekly activities which will handle more records.
   
5. When actually sandbox is moved to production,when i want to change the some part of code,how can you manage to restrict the previous code not to get executed?

Using eclipse, we have to open the xml of the class and we have to change "Active" to "Inactive" in status tag.

Example: <status>Inactive</status>

Online Use case creation tool

Check this site

https://www.draw.io/


Difference between Email-to-Case and On-Demand Email-to-Case

On-Demand Email-to-Case:
On-Demand Email-to-Case uses Apex email services to convert email to cases.

Steps for implementing On-Demand Email-to-Case:

1. Define email addresses on your email system for case submissions.
2. Create email routing addresses that include the addresses defined for cases.
3. Configure your email system to forward case submissions to the Email Services Address provided to you by Salesforce.
4. Enable On-Demand Email-to-Case.

Email-to-Case:
Email-to-Case requires downloading the Email-to-Case agent.

Steps for implementing Email-to-Case:

1. Download the Email-to-Case agent from the Apex Developer Network(http://wiki.apexdevnet.com/page/Members:Email_To_Case)
2. Install the agent behind your network firewall.
3. Configure email routing addresses.
4. Enable Email-to-Case.

Cheers!!!

Difference between the Jumpstart Wizard and the Standard Approval Process Wizard?


Jump Start Wizard
Standard Approval Process Wizard
Jump Start Wizard allows single approval step. Standard Approval Process Wizard supports multiple approval steps.
Many steps are skipped.
All the steps all included.

Cheers!!!

Clarify CRM history

The Clarify CRM tool is a very powerful call center and help desk automation solution that had been a very dominant player in the market during the later part of 1990s. It was then taken over by Amdocs in the year 2002, and since then has been turned into a very robust CRM package that provided solutions from one end to another.

In October 2001, Amdocs purchased the Clarify CRM system from Nortel Networks.

Amdocs further integrated the customer service application into business processes such as capturing and tracking parts and part usage, time utilization, warranty costs, service contract costs, customer history, and trends in items or services.

Clarify is now an Amdocs Customer Relationship Management S/W product.It is based on client server technology which may range from 2 to n tiers.

After its takeover by Amdocs in the year 2002, Clarify CRM solution has ever since evolved to now become a completely integrated CRM package.  This application is now able to meet all kinds of requirements of call centers and help desks.

Since Clarify version 11.5, the following versions were introduced: ClarifyCRM 12.1, ClarifyCRM 12.5 and ClarifyCRM 13.1.

As of ClarifyCRM 13.1, Amdocs changed its name and number to AmdocsCRM 6.0.

AmdocsCRM 6.0 (Clarify 13.1) was the last version to introduce new functionality for Thin (Web) client).

AmdocsCRM 7.1 was the first release that offered Smart Client (Java based client).

However, the first fully matured Smart Client was released on release 7.5 (Italy).

Modules:
  1.     ClearSupport
  2.     ClearQuality
  3.     ClearLogistics
  4.     ClearSales
Cheers!!!

Automatic email scheduler to Contacts accosiated with those Opportunities

Batch Class:

global class opptyDetails implements Database.Batchable<sobject>
{
    global Database.QueryLocator start(Database.BatchableContext bc)
    {
        String soql = 'SELECT Opportunity.Name, Opportunity.OrderNumber__c, Opportunity.Approval_Status__c, Contact.Email, Contact.Name, Contact.Level__c FROM OpportunityContactRole';
        return Database.getQueryLocator(soql);
    }
   
    global void execute(Database.BatchableContext bc, List<OpportunityContactRole> recs)
    {
        List<Messaging.SingleEmailMessage> msgs = new List<Messaging.SingleEmailMessage>();
        for(OpportunityContactRole ocr : recs)
        {
            Messaging.SingleEmailMessage msg = new Messaging.SingleEmailMessage();
            msg.setSubject('Opportunity Detail');
            List<String> toAddresses = new List<String>();
            toAddresses.add(ocr.Contact.Email);
            msg.setToAddresses(toAddresses);
            msg.setHTMLBody('Hi ' + ocr.Contact.Name + ',<br/>Below is the Opportunity Detail.<br/>Opportunity Name: ' + ocr.Opportunity.Name + '<br/>Order Number: ' + ocr.Opportunity.OrderNumber__c + '<br/>Approval Status: ' + ocr.Opportunity.Approval_Status__c + '<br/><br/>Regards,<br/>Admin');
           
            msgs.add(msg);
        }
        if(!msgs.isEmpty())
        {
            messaging.sendEmail(msgs);
        }
    }
   
    global void finish(Database.BatchableContext bc)
    {
    }
}


Scheduler Class:

global class scheduleOpptyDetails implements schedulable
{
    global void execute(SchedulableContext sc)
    {
        opptyDetails od = new opptyDetails();
        Database.executeBatch(od);
    }
}




Apex Scheduler:





Output:



How to fetch Contact details from Opportunity using SOQL in Salesforce?

Sample Query:

SELECT Id, Opportunity.Name, Opportunity.OrderNumber__c, Opportunity.Approval_Status__c, Contact.Email, Contact.Name FROM OpportunityContactRole

Output:




Cheers!!!

Clarity CRM

Clarity CRM provides a broad spectrum of data consulting services for telecommunications, healthcare, government etc.

Solutions provided by Clarity CRM are
  1. Built In Data Sharing
  2. Reporting
  3. Tracking
  4. Security
  5. Email Notification
Cheers!!!

Entitlement Management in Salesforce

Entitlement management helps your support reps determine if your customers are eligible for support.

Entitlement Model
Description
Entitlements Only
Support reps verify that contacts are entitled to customer support before they create cases.
Service Contracts with Entitlements
Support reps verify that a customer is entitled to support based on a service contract.
Service Contracts with Contract Line Items and Entitlements
Support reps verify that a customer is entitled to support based on line items in a service contract.

1. Go to Setup --> App Setup --> Customize --> Entitle Management --> Settings.

2. Enable Entitle Management.


3. Add Entitlement Name field in Case page layout.


4. Add the Entitlements related list to account, contact, and asset page layouts.


 5. Add the Entitlements tab to an app. 


 6. Go to Setup --> Customize --> Entitlement Management --> Milestones.

7. Click New Milestone.

8. Enter a name and description.

9. Click Save.


 10. Add Milestone Status and Milestone Icon fields to Case page layout.


11. Go to Setup --> App Setup --> Customize --> Case --> Case Milestones --> Fields.

12. Add the fields and Save the page layout.


13. Go to  Setup --> Customize --> Entitlement Management --> Entitlement Processes.

14. Click New Entitlement Process.

15. Enter a name and description.

16. Select Active to enable the process.


 17. Click New in Milestone related list.
 

18. Create a milestone.


19. Open the Milestone created by you.


20. Define actions for it.


 21. Set Field Level Security for all the fields.


22. Create an Active Entitlement record.


Status of the Entitlement record is determined by your organization’s current system date and the entitlement’s Start Date and End Date. The status is:

Active
If the system date is greater than or equal to the Start Date and less than or equal to the End Date.
Expired
If the system date is greater than the End Date.
Inactive
If the system date is less than the Start Date.


Sample Record:


23. Create a Case record and edit the Case Milestone record before closing the case.


24. Select the Completion Date and click Save button.


Output: