Posts

Groups and Queues

Groups are set of Users. They contain individual users, other groups, the users in the particular role, the users in a particular role plus all of the users below that role in the hierarchy. There are two types of groups. 1. Public Group             |--> Only Administrator can create public groups, they can be used by everyone in the Organization. 2. Personal Group        |--> Each user can create groups for their personal use. Public Groups: Public Groups are set of users and they are used in a  Sharing Rule Giving Access to Folders Email alerts Public groups made up of any combination of  Users Roles Roles and Subordinates Public Groups When the Public Groups are made up of roles or roles and subordinates, when a User is added or removed from the role, the public group membership is updated. Queues: Queues allow groups of users to manage a shared workload more effectively. A queue is a ...

Reports

* Report types allow us to build a frame work in the report builder from which users can create and customize Reports. * A reoprt type define the set of records and fields available to a report based on the relationships between a primary object and its related objects. * Salesforce provides a large range of pre-defined standard report types. 1. Account&contact --> Contains information about accounts and contacts. 2. Opportunities 3. Customer support (Report types regarding cases and solutions) 4. Lead 5. Campaigns 6. Activities 7. Administrative Report types 8. Price Books, Products and Asset report types * Custom Report Types  In addition to the standard report types, we can also create custom report types. Custom report types extend the types of reports from which all users in organization can create or update custom reports.   

DashBoards

A DashBoard shows the data from source reports(Summary reports, Matrix reports) as visual components, which can be charts, gauges, tables, or visualforce pages. * Each dashboard can have up to 20 components * Administrators control access to dashboards by stroing them in folders with certain visibility settings. * Dashboards folders can be public, hidden or restricted to groups, roles. If we have access to a folder, we can view its dashboards.

Assign a task using Apex

public class TasKcreation {     public TasKcreation(){         String Userid=UserInfo.getUserId();         Contact c=new Contact(lastname='asasaa111');         insert c;         Task newTask = new Task(Description = 'Survey Transaction',                                         Priority = 'Normal',                                          Status = 'Inbound Email',                                          Subject = 'Other',                                          IsReminderSet = tru...

Share a case record using Apex and Trigger

Scenario:  Using Trigger share a record when record insert or update In trigger Call the Apex class  public class ShareRule4 {     public Static void afterInsert(List<Case> c){         List<CaseShare> cShare=new List<CaseShare>();         User u=[select Id from User where alias='aaxis'];         for(Case cs:c){             if(cs.Status=='New'){                 CaseShare cshr=new CaseShare();                 cshr.CaseAccessLevel='read';                 cshr.CaseId=cs.id;                 cshr.UserOrGroupId=u.id;                 cshr.RowCause='manual';                 cShare.add(cshr);       ...

Share a Account record Using Trigger

Scenario:   Whenever a new record is create or update, that record is shared to particular user trigger ShareRule2 on Account (after insert, after update) {     List<AccountShare> accShare=new List<AccountShare>();     user u=[select id from User where alias='aaxis'];     for(Account a:trigger.new){         if(a.Active__c=='yes'){         AccountShare accShr=new AccountShare();         accShr.AccountAccessLevel='read';         accShr.AccountId=a.id;         accShr.ContactAccessLevel='read';         accShr.CaseAccessLevel='read';         accShr.OpportunityAccessLevel='read';         accShr.RowCause='manual';         accShr.UserOrGroupId=u.id;         accShare.add(accShr);          }      ...

Share a record Using trigger class

Scenario:  Share the Opportunity record whose is closed won with a user trigger SharingRules on Opportunity (after update, after insert) {     list<OpportunityShare> opshare=new list<OpportunityShare>();     user u=[select id from user where alias='aaxis'];     //List<opportunity> lop=[select id from Opportunity where ]     for(opportunity op:trigger.new){         if(op.stagename=='Closed Won'){             OpportunityShare opshr=new OpportunityShare();             opshr.OpportunityId=op.id;             opshr.OpportunityAccessLevel= 'read';             opshr.UserOrGroupId=u.id;             opshr.RowCause='manual';             opshare.add(opshr);         }     }