Monday, November 30, 2015

Salesforce Process ISCHANGED function not working with compound address fields

I stumbled upon this issue today and raised a case with salesforce and waiting for a response...
just posting it across for others who might face the same issue...

We created a new process on Account to run on both create & update with a simple criteria formula ISCHANGED([Account].BillingAddress) and added an immediate action to the process to do a update a field on the same account record and activated the process.

what's expected is every time we change the billing address on the account, this particular field should get updated with the value from the process.

strangely, thou the process gets saved without any error for using the IsChanged function on the compound address field, when we updated a billing address on an account, nothing happens. The debug logs shows the process being run but the action is not getting fired.

I recreated the same criteria + action using traditional Workflow Rule + Field update and it works perfectly fine. The Workflow rule runs on Account object (both create & update) and uses the same Criteria Formula ISCHANGED([Account].BillingAddress) and updates the same field.

Since support for Compound address field in ISCHANGED function is a recent addition, I believe its not enabled across all functionalities. I will update this post once I hear back from the salesforce support. There is no known issue as well for this. The only option for now is to go with the workaround of using Workflow rule + field update.

After raising a case with salesforce and going thru multiple rounds of discussions, its now considered as a known issue and will be included in one of their future releases (but no ETA yet).

here's the known issue link :

Wednesday, November 25, 2015

Visualforce Datepicker position when using modal popups

This is a quick post to save sometime for people using modal popups with date fields in a visualforce page..

if the default datepicker that shows up when using apex:inputField for date fields is not rendering properly or if its been displayed behind the popup or in some random position, then don't break your head.. apply the below css in your page and it should work fine..

.datePicker { z-index:1151; position:fixed; }

z-index is to bring the datepicker in front of the popup.. use the number (1151 in this case) higher than the one used for the modal popup..

position:fixed is to align the datepicker next to the input field.

hope this helps and saves time for someone..

Sunday, November 08, 2015

Salesforce Platform Developer I Certification

I m glad to pass the Platform Developer 1 certification today and thought I will share my experience on how the exam was and what sort of questions came up and what topics to read to prepare for the exam

Exam Format
  • Total questions => 60
  • Time allotted => 105 minutes which give close to little less than 2 minutes per question 
  • Pass Percentage  => 68% which means we have to get at least 41 out of 60 as correct that leaves a margin of 19 questions to either go wrong or miss out.
Anyone who's been working with the salesforce platform for at least 6+ months doing both declarative and programming work can easily clear this exam by just revising the topics listed in the certification guide. no magic.

but if you are a beginner & getting started with the platform, then we need to do some work in understanding the platform basics and the world of declarative and programmatic customization parts of the platform.

Topics Covered
The questions are pretty much taken from the topics listed in the certification guide and the % of questions from the topics are close to what's mentioned in the guide..

50% of the questions are across the below 5 topics (say close to 10% for each topic)
  • Platform Basics
    • Multi tenancy architecture - read thru the benefits & constraints of sharing a single instance with multiple clients and how enforcing limits helps to share the resources between the clients 
    • MVC - what parts of the platform corresponds to M , V , C
    • Appexchange - when will you use managed package, unmanaged package, buy vs build scenario
    • where will you develop managed packages
  • Data Model & Management
    • Data Import - how to update existing records during import by mapping external id
    • Schema builder use cases - example : how to delete a field if its referenced in apex
    • Object Relationships - Lookup vs Master Detail, how object / record security works between parent & child in both these relationship types
  • User Interface
    • Visualforce 
      • Merge fields, data binding between your VF page and Controller properties & methods
      • Using Global variables
      • Accessing Custom Settings value based on Current User's profile
    • Lightning Components
      • Where does the controller logic exist ?
      • what's included in the resource bundle ?
      • identify the benefits of lightning components
  • Testing 
    • understand the normal flow of a test method 
    • Creating & Accessing Pricebook and product data in test methods
    • using TestVisible to allow test methods to access a class private methods
    • preparing test data for the test methods using testdatafactory, test setup methods
    • where to store test data and load them in test methods for bulk testing
    • where all you can run your test classes and check the results
  • Debug & Deploy
    • Go thru the log filters, know how to set the filters on apex classes & triggers
    • Developer console - how to use the checkpoint window , log viewer
    • Changesets - possible source & destination in a changeset, deploy / rollback in a changeset, deployment connections
    • Force IDE - what can be updated thru the IDE

and the bulk of the remaining 50% comes from the topic
  • Logic & Process Automation
    • Apex Classes
      • Limits Class - how to get total limits and limits used
      • Schema Class - how to find get record type details, picklist values, object & field information, etc..
      • Exception handling - multiple catch blocks, identify which catch block gets run
      • Anonymous Execution - user vs system permissions
      • Accessing sharing information in apex
      • Inheritance, Interfaces & Inner Classes
      • Variables - Primitive, SObjects, Scope of variables 
      • Collections - List vs Set vs Map 
      • how a multi picklist field value is represented in apex
    • Apex Triggers
      • Order of execution - when the data change gets committed
      • Bulkification- what should be avoided in a loop
      • DML - direct CRUD vs Database methods, using AllOrNone flag to allow partial records to be committed.
      • Error handling - how to pass error back to the user from triggers, how to identify if we are approaching a limit and warn the user
      • Best practices
      • when can we change values of incoming record in a trigger without doing any additional DML
    • Apex Controllers for Visualforce
      • when to use Standard, Standard Set, Custom & Extenstion controllers
      • Constructors for the controllers
      • pagination with standard set controller
      • which controller is a correct fit when overriding standard page with VF
    • SOQL
      • handling the results of the query
      • SOQL for loops
    • Declarative World
      • Workflow rules - cross object field updates,
      • Validation rules - making a field mandatory based on a picklist value
      • Process Builder
      • Rollup fields - where can you declare rollup fieds, possible rollup fields between Standard objects
      • Formula fields - should be able to identify valid operations in a formula field from the given list

There are both scenario based questions as well as code snippet based questions. most of the code snippet based questions looked fairly straight forward without much twists, if you get stuck try to reverse engineer from the answers available and match it back to the flow of code to see which options is the right fit for the given code.

Out of 105 minutes, It took me close to 60 minutes to complete all the 60 questions and I took 15 minutes to revise all the answers few times just to make sure I didn't leave any question unanswered and I have selected the required number of answers for all the multi-select questions and mainly focused on the questions I have marked for review.

Overall I would say its easy to pass this one by just revising the topics listed in the certification guide without depending on any question dumps. gook luck friends..