Wave analytics in salesforce?

Wave analytics in salesforce?

– Wave analytics gives immediate access to powerful data insights through its intuitive point-and-click visual interface.
– You can use “Laptop/desktop, iphone & Ipad and apple watch” with wave analytics to answer key business questions.
– It is a self service analytics application that enables users to make sense of large amounts of data. Users can explore their data to discover new data insights. And also we can create dashboards to monitor key business metrics.

To enable wave-analytics feature you have to reach out Salesforce. Once this feature is enabled, admins have to assign required licences and permissions to users to access wave analytics.

Wave-analytics vs reports and dashboards:

Wave-analytics: It is designed for self-service data discovery, It extends beyond Reports and Dashboards to give you new views into your pipeline, end-to-end customer insight, and historical analytics to help you plan your next best step.

Report & Dashboard: It gives an instant snapshot of the metrics that matter to your business, including team performance, lead volume, and conversion rates.

How to deploy ApexTestSuite from one org to other org?

How to deploy ApexTestSuite from one org to other org?

deploy ApexTestSuite: Are you working/running on same set of test classes by creating test suites and manually creating test suites in your dev, test and multiple environments? If you create you test suite, you can migrate it to multiple environments using metadata migration tool now. “ApexTestSuite” is the metadata name to migrate apex test suite.

<?xml version=”1.0″ encoding=”UTF-8″?>

<Package xmlns=”http://soap.sforce.com/2006/04/metadata”>

    <types>       

        <members>TestSuite Name</members>

        <name>ApexTestSuite</name>

    </types>

    <version>38.0</version>

</Package>

Above script is sample package.xml script to migrate apex test suites. One you retrieve apex test suites, metadata components will be stored with .testSuite suffix and these files are stored in the testsuite folder.

If you are deploying new test classes along with test suite, then you have to add new apex classes to your package.xml

<?xml version=”1.0″ encoding=”UTF-8″?>

<Package xmlns=”http://soap.sforce.com/2006/04/metadata”>

    <types>       

        <members>TestSuite Name</members>

        <name>ApexTestSuite</name>

    </types>

                <types>       

        <members>ApexClass Name</members>

        <name>ApexClass</name>

    </types>

    <version>38.0</version>

</Package>

Apextestsuite

Test Suites – Salesforce? How to create test suite

What is test suites in Salesforce?

Test suite is a collection of test classes that you can run together. If you are working on specific set of test classes and running regularly, create a test suite with the list of test classes that you want to execute and run that test suite instead of running each class individually. And you can use this test suite regularly to run the list of test classes again and again. We can create test suites in the developer console.

How to create test suites?

  1. To create test Suite, go to developer console -> Select tab “Test” -> click New suite see the below image for reference.

Test Suite 1

2. Enter Suite name and click on ok. See the below image for reference.

Test Suite 2

3. Add list of classes you want execute from available test classes section to selected test classes See the below image for reference.

Test Suites

Use arrows which are highlighted with yellow color to move classes from one list to other. Only one test class is there in this list. You will more test classes if there are more on your salesforce org.

How to run test suites?

To run test suite, in developer console go to tab “Test” and click on New Test Suite run and select the test suite you want to execute and click on “Run suites” button.

What are the fields with Database Index?

Fields with Database Index?

Below are the standard and custom fields with database index in Salesforce.

– ID
– Name
– wnerID
– CreatedDate
– SystemModstamp
– RecordType
– Master-detail fields (custom fields are treated as custom indexes for index selectivity conditions and thresholds)
– Lookup fields (treated as custom indexes for index selectivity conditions and thresholds)
– Unique fields
– External ID fields

How can we see filed is indexed from Salesforce UI?

To see a field is indexed or not, go to fields section of an object and see indexed column is checked or not. See the below image for reference. Fields highlighted with yellow color are indexed fields.

Index

 

How to retrieve components in Bulk? – bulkRetrieve

How to use bulkRetrieve?

Here I am going to explain about bulkRetrieve – retrieving components in bulk (retrieving large number of components) for single metadata type. We can use this to retrieve all custom objects, Apex Classes, Apex Pages, Custom Fields, Validations Rules and other metadata types without specifying api names of components.

Here is the syntax to retrieve components in bulk:

<target name=”bulkRetrieve”>

  <sf:bulkRetrieve  username=”${username}” password=”${password}” serverurl=”${serverurl}” batchSize = “100”   metadataType=”<Specify the metadata you want to retrieve>”    retrieveTarget=”retrieveUnpackaged”/>

</target>

Below are the list of parameters can be used for <sf:bulkRetrieve> target:

Username: Salesforce user name for to login. Given user name must have “modify all data” permission. This attribute is required if sessionID is not specified.
password: Password to login. Add 25 digit security token at the end of password.
sessionID: This is required if username and password are not specified. This is the ID of active salesforce session.
Serverurl: specify salesforce server URL, specify login.salesforce.com if you are login to production environment. Specify test.salesforce.com if you are login to sandbox environment. Default value is login.salesforce.com, if the value is blank.
retrieveTarget: Specify the root folder structure which the metadata files are retrieved.
metadataType: Specify the name of the metadata type to be retrieved.
batchSize: Number of items to retrieve while doing multi part retrieve. Default size is 10.
apiVersion: This is optional, this specifies Metadata API version.
maxPoll: This also optional, this specifies number of times to poll the server for the results of the retrieve request.
Unzip & containsFolder are two other optional parameters which can be used for <sf:bulkRetrieve> target.

Specify below target on your build.xml file to retrieve all Apex Classes in your org.
<target name=”bulkRetrieveApexClass”>
<sf:bulkRetrieve username=”${username}” password=”${password}” serverurl=”${serverurl}” batchSize = “1000” metadataType=”ApexClass” retrieveTarget=”retrieveUnpackaged”/>
</target>
Execute “bulkRetrieveApexClass” command to retrieve all classes.
Specify below target on your build.xml file to retrieve all Apex Triggers in your org.
<target name=”bulkRetrieveApexClass”>
<sf:bulkRetrieve username=”${username}” password=”${password}” serverurl=”${serverurl}” batchSize = “1000” metadataType=”ApexTrigger” retrieveTarget=”retrieveUnpackaged”/>
</target>
Execute “bulkRetrieveApexTrigger” command to retrieve all triggers.

Specify below target on your build.xml file to retrieve all custom objects in your org.
<target name=”bulkRetrieveApexClass”>
<sf:bulkRetrieve username=”${username}” password=”${password}” serverurl=”${serverurl}” batchSize = “1000” metadataType=”CustomObject” retrieveTarget=”retrieveUnpackaged”/>
</target>
Execute “bulkRetrieveApexTrigger” command to retrieve all custom objects.