Tag: Apex

  • Access Camera and Audio recorder of Mobile device in Visualforce and upload as chatter file

    In this article we will see how to use Camera and Audio recorder of mobile device in Visualforce and upload as chatter file. It may look that it is very tricky to access device camera and audio control in Visualforce however you may be right if there were no HTML5. Thanks to HTML5 for magic.

  • How to access ListView in Apex | Using StandardSetController for Pagination

    There are scenario in project lifecycle where developer creates SOQL or Dynamic SOQL to return expected result. Also if requirement changes they go back and change existing code to reflect updated SOQL. If you are good developer and avoid to change Apex code at most you will save your SOQL in “Custom Settings” and utilize…

  • Consuming External Web Service in Apex – Salesforce

    One of the feature we have in Salesforce is that we can easily consume External Web Services. In this article, we will learn step by step demo of consuming Web Service in Apex. There are many public websites available to consume Web Service and one of them, I am using in this article is http://www.webservicex.net…

  • AutoComplete Component in Visualforce using JQueryUI

    In this tutorial, I am going to explain very Simple AJAX and JSON based Auto Complete component with the help of JQuery UI. First I am assuming that you already have Static Resource of named “AutoCompleteWithModal“. This Static resource has all images, CSS and JQuery library needed to implement this component. In one of my…

  • Using FieldSet with Visualforce and Apex

    One of the disadvantages comes up with Custom Page or Overriding New or Edit button with Visualforce page is its “Maintenance”, if New Filed is Added or needed to remove field we have to modify our code every time. However, Thanks to Salesforce that we have “Field Set“. With the Help of “Dynamic Visualforce Binding”…

  • How to Debug Manage Package in Salesforce

    Many times as a developer we need to debug the manage package for possible run time error. For example , while uploading contacts using Import wizard we get “Internal Server Error” and when we try to look into debug log there is no clear indications. However in my experience i have seen this kind of…

  • Salesforce Interview Question – Part 13

    121 : Consider we have overall 90% code coverage however there is one class which have 0% code coverage. Can we still able to deploy that class on production? Ans : Yes. Minimum 1% required for every trigger and there is no such restriction for Apex class. 122 : How to get selected records ID…

  • Salesforce Interview Question – Part 12

    111 : How to get the Recordtype Id using Dynamic Apex? Ans: Normally to get the RecordtypeId for any sObject we use SOQL and it will count against your limit. So below method will bypass the need of SOQL Query. or 112 : Write Apex code which will take the RecordID as input and on…

  • How to Sort Wrapper class Collection in Apex

    There is inbuilt functionality in Apex to sort the primitive datatypes supported by force.com. I am sure maximum of developers must have come across the situations where they need to sort custom datatype built by them i.e. custom class or I would say wrapper class in terms of force.com. But think, How force.com will come…