Tuesday, March 31, 2015

Tooling API Overview

Tooling API provides SOAP and REST interfaces that allow you to build custom development tools for Force.com applications. For example, you can:
  • Add features and functionality to your existing Force.com tools.
  • Build dynamic modules for Force.com development into your enterprise integration tools.
  • Build specialized development tools for a specific application or service.

Tooling API exposes objects used in developer tooling that you can access through REST or SOAP, and works just like the Salesforce REST API and SOAP API.

Tooling API provides both SOAP and REST interfaces.
  • Use REST API if you’re using a language that isn’t strongly typed, like JavaScript.
  • Use SOAP API if you’re using a strongly typed language like Java that generates Web service client code. 

Tooling REST API


The base URI for each Tooling REST API resource is http://domain/services/data/vXX.X/tooling/ where domain is a Salesforce instance or a custom domain and vXX.X is the API version number. For example: http://na1.salesforce.com/services/data/v28.0/tooling/

For complete list of Tooling API resources, refer below URL:

Available Custom Objects using tooling API


If you have to find out all available custom objects in your org, then use below code sample :



Available Validation Rules using Tooling API


Below apex code will give all validation rules in your organization:



Tooling API can be used to perform the following tasks


  • Manage working copies of Apex classes and triggers and Visualforce pages and components using the ApexClassMember, ApexTriggerMember, ApexPageMember, ApexComponentMember and MetadataContainer objects.
  • Manage working copies of static resource files using the StaticResource object.
  • Check for updates and errors in working copies of Apex classes and triggers and Visualforce pages and components, and commit changes to your organization using the containerAsyncRequest object.
  • Execute anonymous Apex. 
  • Manage custom fields on custom objects using the CustomField object.
  • Access code coverage results using the ApexCodeCoverage, ApexOrgWideCoverage and ApexCodeCoverageAggregate objects.
  • Execute tests, and manage test results using the ApexTestQueueItem and ApexTestResult objects.
  • Manage validation rules and workflow rules using the ValidationRule and WorkflowRule objects.

Monday, March 16, 2015

Spring 15 Release-Enhancements and new Features

The Force.com Spring '15 Release introduces compelling new enhancements and features that will automate time-based processes, enhance mobile experiences and streamline your overall development. Run more tests in Sandbox and Developer orgs, and monitor jobs for asynchronous execution.


Analytics: Introducing Wave, the Analytics Cloud

Analytics Cloud gives you a fast, fluid way to drill through data, discover compelling insights, and share the right visuals to tell your data story. Datasets, lenses, dashboards, and apps are collections of data that represent different levels of refinement—everything from raw data uploaded from your source systems to highly curated, packaged views of your data. With the mobile-first Analytics Cloud, you can explore all types of data from your mobile device. Check in on this quarter’s customer cases, track progress toward sales goals, and instantly share learnings.

With new Salesforce analytics clouds, users can gain insight in your business through data. Users can:
  • User can explore millions of data points from multiple sources with ease.
  • Insights are not and should not be restricted to the desktop. With the mobile-first Analytics Cloud, you can explore all types of data from your mobile device. Check in on this quarter’s customer cases, track progress toward sales goals, and instantly share learnings with your team. No matter where you are, collaborate and share insights with colleagues and know your customers like never before.
  • User can share their findings with other teams or users.
Analytics Cloud brings data from different business process and systems. Data can be from Salesforce, data warehouses, CRM and ERP systems, log files, CSV files, XML files and more. Data Sources can be provided in structured, semi-structured or unstructured form. Salesforce uses powerful indexing technology. It provides capacity to scale to many rows with any data type.

Apex Code Enhancements

  • Submit More Batch Jobs with Apex Flex Queue: Submit up to 100 batch jobs simultaneously and actively manage the order of the queued jobs to control which batch jobs are processed first. This enhancement provides you more flexibility in managing your batch jobs.
  • Make Long-Running Callouts from a Visualforce Page: Use asynchronous callouts to make long-running requests from a Visualforce page to an external Web service and process responses in callback methods. Asynchronous callouts that are made from a Visualforce page don’t count toward the Apex limit of 10 synchronous requests that last longer than five seconds. As a result, you can make more long-running callouts and you can integrate your Visualforce pages with complex back-end assets.
  • Set Up Test Data for an Entire Test Class: Use test setup methods (methods that are annotated with @testSetup) to create test records once and then access them in every test method in the test class. Test setup methods can be time-saving when you need to create reference or prerequisite data for all test methods, or a common set of records that all test methods operate on.
  • Chain More Jobs with Queueable Apex: Queueable Apex was introduced in Winter ’15 and enables you to easily start and manage asynchronous processes. Previously, you could chain a queueable job to another job only once. You can now chain a job to another job an unlimited number of times. For Developer Edition and Trial organizations, your chain can have up to five queueable jobs.
  • Access Address and Geolocation Compound Fields Using Apex: You can now access address and geolocation compound fields in Apex using the new Address and Location classes. Previously access only compound fields’ component fields in Apex. You can now query compound fields and their components using the new Address and Location class methods.
  • Make Apex Callouts with More Data: The callout size limit for requests and responses has been increased to the heap size limit. With a larger callout size for requests and responses, you can send and receive more data from an external Web service.
  • List Apex Classes and Triggers With a Tooling API Endpoint: Use the apexManifest Tooling API endpoint to list all of your Apex classes and triggers, including global classes and   triggers from your installed managed packages. Rather than querying both the ApexClass and ApexTrigger objects, you can retrieve a quick list of both classes and triggers with just one API call. Unlike ApexClass, apexManifest retrieves your inner classes—previously, you needed to get and parse the symbol table to retrieve your inner classes.
  • String Methods Fixed for Escaping Additional Characters: When you activate this update, these Apex String methods will escape additional characters: escapeHtml3, escapeHtml4, and escapeEcmaScript.


Salesforce 1 Enhancements 

  • You can turn your users into power users with Salesforce Adoption Manager. If you enable this feature, users receive customized suggestions based on how they work in both the full Salesforce site and the Salesforce1 mobile app. To enable Salesforce Adoption Manager, from Setup in the full Salesforce site, click Manage Users > Adoption Manager and select Enable Salesforce Adoption Manager.
  • Salesforce introduce Create New task that allows end users to create task directly from post in their chatter feed.
  • To take advantage of the larger screen on tablets, Salesforce1 uses a different object home page interface than what’s provided on smartphones. Tablet users can see more details about recently viewed records, directly access standard and custom list views, and search across other objects as well as the current object. The tablet version of object home pages is currently available in the Salesforce1 mobile browser app app only.
  • When using Salesforce1 on tablets, users get an enhanced list view experience that shows more record details at a glance and includes more sorting options and intuitive controls for navigating through this extra information. The tablet version of list views is currently available in the Salesforce1 mobile browser app only.
  • When using Salesforce1 on smartphones, users can now see more than four list views for an object directly from an object’s home page. It’s no longer necessary to first open a specific list view to access other list views. When using the mobile browser app, simply tap More List Views on an object home page. (If a user hasn’t yet accessed any list views at all, the option is Show List Views.) Users see up to 200 list views for the object, including list views that haven’t been accessed recently in the full Salesforce site.
  • Now users can add a file and a link directly from the New Post page. This feature is available in the Salesforce1 mobile browser app only.
  • If Chatter Questions is enabled for your organization, you can give moderators the ability to escalate questions in Chatter to cases, making it easier to track and resolve your customers’ issues. Question-to-Case is available in the Salesforce1 mobile browser app only.
  • Put all your content at users’ fingertips. If Files Connect is set up for your organization, Salesforce1 mobile browser app users can browse and share files from external data sources, such as Microsoft SharePoint and OneDrive for Business.
  • Data.com Duplicate Management lets you control whether and when you allow users to create duplicate records inside Salesforce. Set up duplicate rules in the full Salesforce site and you can also manage whether Salesforce1 users can save records that are identified as possible duplicates. Duplicate management is now generally available in all versions of the Salesforce1 mobile app. Duplicate rules tell Salesforce what action to take when users attempt to create records that might duplicate existing Salesforce records. For example, the rule could block users from saving the possible duplicate record or allow them to save it anyway.
  • Records with standard address fields now display a Google Maps image of the address. This saves user’s time by letting them see where their contacts or accounts are located, instead of having to locate addresses in an external map application. This feature is available in all versions of Salesforce1.
  • Sales representatives on the go can now convert qualified leads to contacts and create opportunities (beta), which helps sales representatives grow their revenue pipeline. This option is available in all versions of Salesforce1.


Salesforce1 Reporting Enhancements

  • Subscribe to Receive Report Notifications: Your users can now sign up for report notifications, to stay up-to-date on the metrics they care about most. Subscribe to a report and set the conditions that should trigger notification.
  • Increase the Session Security Level Required to Export and Print Reports: You can now set a security policy that requires users to have a high assurance session to export and print reports. Set this policy to restrict access to users who can perform these tasks. Previously, you could require a high assurance session to access resources like reports, dashboards, and connected apps. Now, to give you finer access control, you can also require a high assurance session to restrict access to exporting and printing reports.
  • Dashboard Wizard and API Create Correct Relative URLs:  The dashboard wizard and API no longer cause errors when you enter Drill Down to locations other than absolute URLs. To fix a potential security issue, the dashboard builder, wizard, and API now create correct relative URLs when you use text to represent the location Salesforce takes users to when they click a dashboard component. The text you enter is escaped with a backslash and converted into a relative URL. All three ways of creating dashboard components accept absolute URLs as is and don’t convert them to relative URLs. (Absolute URLs look like salesforce.com and www.salesforce.com)
  • The Reports and Dashboard Tabs Are Protected from Clickjacking: For enhanced security, clickjack protection is now enabled for Salesforce1 Reporting. This means that the Reports and Dashboards tabs can no longer be embedded inside an iframe. Previously, you could turn clickjack protection on and off. Now, clickjack protection is always active.


Lightning Process Builder

The Process Builder is a new workflow tool that helps you easily automate your business processes by providing a powerful and user-friendly visual representation of your process as you build it. The Process Builder’s simple and powerful design allows you to:
  • Create your processes using a convenient visual layout with point-and-click efficiency.
  • Create your whole process in one place rather than using multiple workflow rules.
  • Create processes by collaborating with different teams in your business.
  • Stop using Apex code to automate simple tasks.
Automated processes in the Process Builder consist of criteria that determine when to execute action groups and immediate and scheduled actions to execute when those criteria are met. Any change that causes a record to match the criteria can automatically trigger the action group.
You can use the more powerful and flexible Process Builder to perform the same actions as workflow. The process builder doesn’t support outbound messages, but you can easily create one yourself with Apex. With the Process Builder, you can:
  • Create a record
  • Update any related record—not just the record or its parent
  • Use a quick action to create a record, update a record, or log a call
  • Launch a flow—as an immediate or a scheduled action
  • Send an email
  • Post to Chatter
  • Submit for approval
If you need your process to do more than what those actions allow, don’t worry. You can also call Apex from a process.


Manager Groups

Share records up or down the management chain using sharing rules or manual sharing or apex managed sharing. Manager groups were previously not automatically enabled in your organization. With Spring ‘15, you can enable this feature on the Sharing Settings page.
  • Allows users share records with their management chain, instead of all managers in the same role.
  • Manager groups can be used wherever other groups are used, such as in a manual share or sharing rule. But they cannot be added to other groups and don’t include portal users.
  •  Manager groups can contain Standard and Chatter Only users only.


Import Accounts and Contacts with Ease

My Accounts & Contacts wizard, which makes it even easier to get accounts and contacts from the data sources that matter to you into Salesforce. If you have a new Salesforce organization, you can get to the wizard from the Accounts and Contacts tabs in Salesforce. Or, just click Your Name > My Settings > Import > Import My Accounts & Contacts, and then start the import wizard.
You can import Accounts & Contacts from 15 different sources like Outlook, Excel, Gmail, LinkedIn, Act, Quickbook etc.