Posts

Showing posts from July 23, 2017

Salesforce Q&A Part 5:

Customization Part 1: Trigger: Q)   Explain Trigger and its flow. Ans . Apex Triggers are event handlers. When a record associated with the trigger is inserted, updated, deleted, or un-deleted the Salesforce.com system will "fire" or execute the trigger event.  Salesforce executes a trigger in two different contexts: before and after.  Before-trigger events are executed before a record has been committed to the database, while after-trigger events are executed after a record is committed to the database.  Events before/after(insert, update, delete) and after un-delete. Events helps in defining the criteria for trigger to run.  Within the scope of trigger we define the Trigger context variable like isInsert, isUpdate, isDelete, isUndelete, isAfter, isBefore, isExecuting, new, newMap, old, oldMap and size.  With deceive context variable we call for helper classes and pass the parameter to those classes(all logic implementation is carried ...

Salesforce Q&A Part 4:

Customisation Q&A Continued: Q)   How can we perform a 'callout' using  javascript button? Ans. Old Way : button logic {!REQUIRESCRIPT("/soap/ajax/30.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/30.0/apex.js")} if({!AAA__c.Name}!=Null) {     sforce.apex.execute("MyClass","myMethod",{}"});     alert("This is {!AAA__c.Name}"); } Apex class logic: global class MyClass {     webservice static void myMethod() // you can pass parameters     {          // Do something     } } New Way: Create visualforce button as javascript button is incompatible in SF1 and Lightning. <apex:page standardController="Case" extensions="EscalCase" action="{!caseEscalation}"> <apex:form> <apex:inputHidden value="{!case.OwnerId}"/> </apex:form> </apex:page> Apex: public class EscalCase {     //Apex properties or variables     public Id ow...

Salesforce Q&A Part 3:

Q) What are the automation tool in salesforce? Ans . Approvals, Process Builder, Workflow, and Visual Workflow. Q) What is a process builder? Ans. A process builder is a workflow tool with improved functionality to improve business processes. It provides user friendly graphical representation (like a flow chat)to build process. Process builder is easy  to create using point and click  efficiency and design entire process at one place rather than creating several workflow. Process builder is a mighty tool for Admins to create small automation without using any apex code. It can be designed by collaborating with different teams also. A process builder can be configured in three types: 1. Criteria that determine when to execute Action group. 2. Immediate action on meeting the criteria. 3. Scheduled action on meeting criteria.(not for in-vocable processes) Process Builder perform the same actions as workflow except for outbound messages. But with the Process Build...

Salesforce Q&A Part 2:

Configuration Continued: Q) What are the different ways of sharing a record with an user in Salesforce? Ans.   OWD, Profile, Role, Permission settings. Q)   What is sharing rule in Salesforce? Ans.   S haring rules are used to extend sharing access to users in public groups, roles, or territories . The access can be both Read only/Read Write access. Q) Can we override OWD? Ans. Yes, it is overridden whenever you declare a permission set or create a sharing rule. Sharing rules create automatic exceptions to OWD to provide greater access to user(s). Q)   What is a validation rule and why we use it? Ans. Validation rule validate data entered by user or a program to salesforce record. it is used to improve and maintain data quality. Q) What is the return type of validation rule? Ans. Formula or Expression returns Boolean. Q) When does a validation rule display an error message? Ans.  Expression/Formula returns True. Q) Methods/Proce...