Posts

Showing posts from September, 2013

Custom Alert Message On Salesforce 'Submit For Approval' Button !?!

Image
Recently I came across a scenario where the business wanted to see the custom message on click of submit for approval button?!? When we understood what was happening on click of the button, It was lot easier for us to implement that. Salesforce.com apps are being used on the web browsers We can identify what is given to the browser by "right-clicking" on the browser element and seeing what the html for that element, like explained below. I recommend you do this before proceeding with the solution. 1) Login 2) Go to a record which has an active approval process. 3) Right click on "submit for approval" button 4) Inspect element (Chrome/ Firefox) or view source (safari/ IE and you have to search for "submit for approval" button tag) There, you will see -- That is just html generated by Salesforce but it has something that we need for this solution. So lets understand that. It has for confirmation-type alert what is conform() and it has g

Invoke Workflow When Only One Field Is Changed!

Image
Hi This is only configuration, but I see people not aware of such thing. We all opt for code not knowing that there are standard ways to do so many things. The following is one of that. Requirement : When Stage of Opportunity is changed , Say, we have to update allowance (text) field. Solution 1 : Write a workflow rule and a field update. Solution 2 : Write a trigger which has the logic for checking if the field value is changed and do some more statements. But there is one problem with Sol 1, i.e., t his runs the FU every time record is changed, if our FU is a complicated formula field we would like to go with apex trigger. But there is standard way. There is one option where we can run these FUs only when the field is changed. And we also can write these formulas for rule criteria. HTH Prabhan