Pages

02 November 2015

Salesforce Platform App Builder Exam Prep and Experience (Part - 2)


Continuing from where we have left in part 1 lets jump straight into the topics.

  1. Salesforce1 Mobile App Developer Guide, Object Specific Actions, and Global Actions: I believe there was 1 question on the Salesforce1. I believe the question was what type actiondo we create and place it on which page layout to create a detailed record or related record from a parent detailed page. The preparation I did was sufficient to tackle the questions. The following is exactly what I did:
    Salesforce1 Trailhead and I did a couple of hands on in my Developer instance by creating Object based actions, and global actions and viewing them on the mobile device.

  2. Sandbox Environment Types: this topic had 1 question and was rather straight forward. Pay special attention to “Sandbox Feature Quick Reference” and limits, refresh frequencies from the following resource: Sandbox Types. Just skim through Sandbox Templates, just so you are aware of the usage.

  3. Person Accounts: The resource that was at most helpful for me was “Person Account Behaviors”. There were two questions regarding person accounts. There are some typical behaviors of person accounts that I have personally never noticed. Things like the following:
    • Person accounts can be merged with only other person accounts.
    • The icon for the Person Account is different from the Business Accounts.
    • The storage aspect of person accounts – They are stored against both the Account and Contact storage.

  4. Changing Custom Field Types: I followed the recourse from the documentation: “Changing Custom Field Types”. The “Additional restrictions” section is important, especially the Text Area (Long), Text Area (Rich) and Auto Number.
  5. The questions were straight from the documentation “so take the hint” and understand the restrictions thoroughly.

    With the Auto number – Text conversions: Auto number can accommodate anything of max 30 characters. If we have an auto number field and we are converting it to text, the text will be default of size 30 characters.

    If we have a text of more than 30 characters and you try to convert it to Auto number you would receive “Unable to convert a text field with more than 30 characters.” error. Thus converting text – auto number and auto number – text does not lead to loss of data.

    [Text Area (long), Text Area (Rich) straight from the link above.]


  6. Managed and Unmanaged Packages: This is a topic again straight from the documentation: Salesforce Resource.

Finally, there was one online blog I found helpful as well. I am mentioning it below, feel free to check that out.  Cloud Professionals App Builder Sample.

Please let me know how helpful the resource series was. Thank you for checking out the posts.

21 October 2015

Salesforce Platform App Builder Exam Prep and Experience (Part - 1)


Salesforce has changed by leaps and bounds from where I have started on Salesforce with my first implementation in 2008 (both configuration, customization wise and as a platform). After a 2 years of intermittent hands-on on Salesforce, I felt the best way to come back is via this post. I recently joined the full time work force and back to continuing my Salesforce journey after my MBA.

This has been a much requested post, as soon as I have updated my profile on Linkedin I got requests for “Dumps” a fool proof way of clearing any SFDC certification. I admit that I myself have resorted to flash cards during my initial times. In my preparations for various certifications, a prominent realization was that it is the orientation and in depth exposure to all topics and the hands on that “A particular exam” demands for that matters. Also the key is to go that extra mile to “know beyond general behaviors” of the tool (salesforce), because we all know the general behaviors already. Once we are familiar with the topics outlined in the Exam guide, we can be rest assured that we will pass the exam.

Let’s get straight into the exam preparation and my experience. I am going to outline the prep based on the transition guide and topics outlined.

1. Salesforce AppExchange Overview Demo is a good start to understand what AppExchange can offer.
There was one scenario based question on when does an organization prefer to purchase an AppExchange tool in opposition to organic development (in-house customization).

2. Record Types: There is prominence of record types in Business Processes like “Sales Process”, “Support Process” that they create a level of abstraction to users belonging to various groups in the organization. Pay special attention to scenarios like, what happens when a value is added to master Picklist, do we add the new values manually to the existing records types etc.

I personally benefited from this resource: Read the tips as well in the document.  Cheatsheet (there were 2 questions in scenario format)

3. Rollup Summary Field: There were around 2 questions on what is the kind of relationship that allows Rollup Summary field type in a scenario based format. Please concentrate on the “Management” Section.

Out of the 2 questions, one was a very poorly worded question that revolves around: A parent object and a detailed object. There are detailed records created daily, but the question reads that the parent record is created once a month using Apex and says the parent summarizes the detailed records at the beginning of the month when the parent record is created via Apex. Unfortunately I felt this was unfair question since none of the options supported the Apex related Parent Child relationship behavior. But ultimately only answer that could satisfy Rollup behavior – summarization behavior was Master Detailed relationship (To know more about this question please leave a comment, so I can share details)

4.  Field Update Considerations: This is by far a topic I enjoyed seeing in the exam. The questions were surely food for brain. The take home for me was the fact that a Field Update results cannot trigger any of the rules such as Validation rules, Assignment rules, Auto Response and Escalation Rules. There were around 2 questions which revolved around these concepts.

Pay close attention to how Field updates on the Approvals behave and also how the field updates on workflow behave. Can Approval Processes support “Cross-Object” formula field updates? Scenarios that would just ignore field updates, but would not explicitly error out and abort the processes/automations.

How would a validation rule behave in conjunction to field updates? If there is a conflict between field update and validation rule, i.e. the workflow field update has updated a field in such a way that it violated the validation rule what would happen?

I found the documentation more than enough for the exam. Concentrate on the section “Field Update Limitations”.

Follow the following links:

https://help.salesforce.com/HTViewHelpDoc?id=workflow_defining_field_updates.htm&language=en_US

https://help.salesforce.com/HTViewHelpDoc?id=workflow_cross_object_field_updates.htm&language=en_US

https://help.salesforce.com/HTViewHelpDoc?id=workflow_field_updates_reevalute_wf.htm&language=en_US

5. Social Accounts, Contacts and Leads: I would suggest you to setup the feature in your dev org and try out once. This is a very basic topic and saw one question on this topic. The take home points for me were that every employee in the salesforce organization needs to have their own social media account to view the particular Account / Contact / Lead details and the level of visibility of details depend on how you are connected to these records (accounts/contacts/lead). LinkedIn support is withdrawn going forward so please note that.

6. External Objects: This topic needs much attention. I do not exactly recollect how many questions I have seen from this topic (may be 2). The questions were not essentially around basic knowledge of External objects, but were more scenario based questions. Pay close attention to the following topics: https://help.salesforce.com/apex/HTViewHelpDoc?id=external_object_relationships.htm&language=en_US

Go in depth into each relationship type. The documentation would suffice w.r.t the examination. The examples outlined were very well written. (Ex: How do we show external invoice records on Account detailed page etc.) What fields can be created on an External Object? How do we sync data into the External Objects?

7. Lightening App: There was only two question as far as my memory goes. The question asked for what kind of components can be added via lightening App builder, more scenario based.

Any reason why we cannot add a Visualforce page to the Home page in the lightening?

The video https://www.youtube.com/watch?v=qm_kQFfRIaY&feature=youtu.be is a good place to start. Follow the Trailhead because it is more than sufficient. Admin Trail - Migrating to Lightning Experience (Trailhead Lightening Migration)

Hope this part of the post helps you guys with the preparation for Platform App builder Transition exam. I will cover rest of the topics in the next post in the coming days.

Please feel free to leave a comment in case you have a specific question regarding any of the topics covered.

Experience: My experience in studying each of the topics in depth was very interesting. When I took the exam I felt it was one of the easiest exams I have taken and expected that Transition exam would be much tougher. This is strictly my personal opinion, the reason I say this is one of my friends who took the exam same day felt it was a little tougher. So the salesforce exams completely depend on the hands-on and preparation before you visit the exam center.

04 February 2013

Fire Lead Assignment with Apex

In doing a daily load of leads, my customer notified that he was not able to trigger the assignment rules: I wanted to check if we could replicate the issue and trigger the assignment rules from the Apex snippet. Here we go ! This is trivia, but helpful. Just create a lead meeting the assignment rule criteria:
 lead l = new lead (Lastname='testlead', company='testcompany',status = 'Unqualified',   
 leadsource='Innovadex',recordtypeid='012d0000000Wcq0',industry='Personal Care & Cosmetics',country='USA');  
Add the following to your code to trigger the assignment rule via Apex.
 Database.DMLOptions dmo = new Database.DMLOptions();  
 dmo.assignmentRuleHeader.useDefaultRule = true;  
 l.setOptions(dmo);  
 insert(l);  
Hope this helps.

30 January 2013

Google Visualizations Column Chart Snippet

See below how you like the Google Column chart Visualization. Sounds like fun ? Yeah it is lot more fun than we can think ;)

The visualizations have evolved over a period of time now. The GV moved to "corechart" packages in their implementation.
Sounds Obtuse? Well read on to crack the nut !

Have a look at the graphs rendered with the old and new packages below.

NOTE: It is a common error with GV (Google Visualizations) that the charts do not render as expected in versions of IE.
I had a chance to debug and achieve the functioning of GV in IE 9 as well. In the post following we would see how to implement the GV column chart and also, how to over come when faced with known issues.

With Old Package With New Package

Lets Get Started !!!

Here is the code snippet for a GV implemented with the old Google packages like "Column Chart".
 <apex:page >  
 <html>  
 <head>  
      <script type="text/javascript" src="https://www.google.com/jsapi"></script>  
      <script type="text/javascript">  
            google.load("visualization", "1.0", {packages: ["columnchart"]});  
            google.setOnLoadCallback(drawLineChart);   
            var data = new Object();  
            function drawLineChart() {  
                data = new google.visualization.DataTable( eval( '({cols: [{id: "col1", label: "Name", type: "String"},{id: "col3", label: "2013", type: "Number"},{id: "col4", label: "Budget", type: "Number"},{id: "col5", label: "Forecast", type: "Number"}], rows: [{c:[{v: ""},{v: 5341.0},{v: 0.0},{v: 0.0}]}]})' ) );  
                var chart = new google.visualization.ColumnChart( document.getElementById('page:form:chart_div') );  
                chart.draw(data,   
                            {width: 500,   
                               height: 250,   
                               legend: 'right',   
                               title: 'YTD Sales Summary',  
                               is3D : false,  
                               colors : [],  
                               borderColor : 'white',  
                               focusBorderColor : 'gold',  
                               titleX:'YTD',  
                               titleY:'USD',  
                               titleColor:'Black'  
                            });    
                var listenerBody = "";  
                if(listenerBody != ''){  
                     var selectListener = new Function("e", listenerBody);  
                     google.visualization.events.addListener(chart, 'select', selectListener);  
                }  
           }  
      </script>  
 </head>  
 <body>  
 <div style="width: 500px;" id="page:form:chart_div"><iframe id="GChart_Frame_0" height="250" marginHeight="0" frameBorder="0" width="500" name="GChart_Frame_0" marginWidth="0" scrolling="no"></iframe></div>  
 </body>  
 </html>  
 </apex:page>  

The code snippet below is the function that is responsible for drawing the chart with the data provided.

 function drawLineChart() {  
         data = new google.visualization.DataTable( eval( '({cols: [{id: "col1", label: "Name", type: "String"},{id: "col3", label: "2013", type: "Number"},{id: "col4", label: "Budget", type: "Number"},{id: "col5", label: "Forecast", type: "Number"}], rows: [{c:[{v: ""},{v: 5341.0},{v: 0.0},{v: 0.0}]}]})' ) );<br/>  
**Here we define the columns and the data types of the columns to pass the data and add "Rows".

NOTE: In the New Google Viz the package has been changed to "corechart".

 google.load("visualization", "1.0", {packages: ["corechart"]});  

NOTE: The data types have become case sensitive. Example "string" instead of "String".
Else the charts do not render in IE.
 function drawLineChart() {  
        data = new google.visualization.DataTable  
 ( eval( '({cols: [{id: "col1", label: "Name", type: "string"}  
 ,{id: "col3", label: "2013", type: "number"}  
 ,{id: "col4", label: "Budget", type: "number"}  
 ,{id: "col5", label: "Forecast", type: "number"}], rows: [{c:[{v: ""},{v: 5341.0},{v: 0.0},{v: 0.0}]}]})' ) );  

To Populate the data from Salesforce Database using java script remoting, check this out. Visualforce charts with Javascript Remoting

In my next post we would take-up importing Google Visualization Project.


23 January 2013

Google Visualizations Project in Salesforce

Google Chart Tools provide a perfect way to visualize data on your website.Considering that the Salesforce Visualizations are in nascent state, Google visualizations prove to be a powerful alternative.

Here is a better way of having a reusable templates for Google visualizations which was made available on "wiki developer force".

Google Visualizations

Google Visualizations Install Instructions :
  1. Install Subclipse.
  2. Create a Force.com project configured for your Developer Edition org.
  3. In the Force.com IDE, choose the SVN Repository Exploring perspective in the upper right-hand corner. If this is not available, go to the Window menu, select "Open Perspective", choose "Other", then from the menu that appears, select "SVN Repository Exploring".
  4. Right-click in the SVN Repository Explorer and select New -> Repository Location.
  5. Specify the URL of the repository: http://apex-google-visualization.googlecode.com/svn/trunk/
  6. Click Finish.
  7. Expand the SVN repository until you see the GoogleVisualizations folder.
  8. Right-click on the src folder and choose Export.
  9. For the export directory, click the Browse button and navigate to the project in the file system. (You should select the project directory in this step, and not the src sub-directory.)
  10. Click 'Ok'.
  11. Use the pull-down menu in the upper right-hand corner of the IDE to switch to the Force.com perspective. If this is not available, go to the "Window" menu, select "Open Perspective", choose "Other", from the menu that appears, select "Force.com".
  12. Right click the src folder in your IDE project and select Refresh. This will update your workspace with the files retrieved from SVN.
  13. Right click the src folder again, and select Force.com > Save to Server. This will update the server with the files retrieved from SVN.
  14. Verify that your project builds without error.

Once the project is successfully installed to eclipse you would find that all the demo components for each chart type are available.


Making use of each component we may display charts of various types. (Column chart, line chart etc.;)