Dreamforce 2019 Key Takeaways for Developers and Admins

Dreamforce 2019 Key Takeaways for Developers and Admins

Salesforce’s annual Dreamforce conference wrapped up recently in San Francisco and it was a huge success like all previous editions. 

The four-day event brought together some of the brightest minds and influential leaders in business and featured more than 2,500 different sessions. At Dreamforce 2019, Salesforce unveiled a lot of new updates and features for its products aimed at delivering personalized customer experiences.

Product Announcements at Dreamforce 2019

Customer 360 Truth – A new set of data and identity services that enable companies to build a single source of truth across sales, service, marketing, commerce and more to create a single, universal Salesforce ID for each customer. The goal of Customer 360 Truth is to provide companies easy access to data across multiple systems and a more efficient way to deliver and predict their customers’ needs.

Tableau – Tableau has announced Netflix-style AI-based visualization recommendations to help customers quickly find relevant previews and basic updates to Ask Data, and make better decisions.

Tableau has also introduced metrics to let business leaders easily and effortlessly track performance metrics. Users can easily create, track, and view key performance indicators from several dashboards. Also, Tableau has expanded its strategic relationship with Amazon Web Services by announcing Modern Cloud Analytics (MCA), a new initiative designed to help customers harness the full potential of self-service analytics. 

Salesforce and Apple Partnership

Salesforce and Apple have announced three new products at Dreamforce 2019.

Salesforce Mobile App, the revamped CRM application, Trailhead GO, the mobile app for Trailhead for iOS and iPadOS, and Salesforce Mobile SDK to empower developers to easily build and deploy native apps for iPhone and iPad.

Einstein Call Coaching 

The new solution for Sales Cloud enables managers to gain deep insights and identify trends within their sales teams’ conversations with clients.

Salesforce and Amazon Partnership

  • The latest Service Cloud Voice integrates telephony into the Salesforce Service Cloud to provide contact center agents with a complete set of tools in their agent workspaces that provide enhanced customer service support.
  • Salesforce and AWS offer AWS content on Trailhead, Salesforce’s free online training platform, designed to educate anyone on the cloud.

Dreamforce 2019 Announcement for Admins

  • Salesforce has introduced a service cloud voice through which admins can create custom versions of the Voice Assistant for every user with the help of Einstein Voice Assistant and Einstein Voice Skills.
  • Einstein Call Coaching is used to optimizing the sales team’s customer interactions through conversational intelligence.
  • Pardot enhancements include new Lightning email builders and sandboxes.
  • Make sure your data never crosses the public internet using private connect. 
  •  Lightning sandboxes can be refreshed on-demand and created in minutes.
  • With Security Command Centre, the admins can manage security policies and connectivity, view trends, receive proactive alerts and achieve multi-org visibility.

Dreamforce 2019 Announcements for Developers

  • With the Open sourcing Lightning Base Components, you can start developing your User Interface with more than 50 Lightning base components.  
  • Salesforce Blockchain is now available in Development Preview. 
  • Data Masking feature can be used to secure your sandbox data and choose how to encrypt or delete it.
  • Local development server is introduced to create, run and test the local Lightning web component.
  • With the new Einstein API and user interface features, you can create smart links and connections. You can build custom models with clicks with the Einstein Vision and Language application and analyze the text in six languages by Einstein Multi-Language Feature.
  • With the all-new real-time event monitoring features, you can create targeted transaction security policies to prevent data loss. 

Need any assistance with Salesforce development, CRM implementationdata migrationField Service Lightning, and Salesforce integration with third-party tools such as Outlook, MailChimp, and more? Contact Cloud Analogy – the world’s most trusted Salesforce Consulting Partner and Salesforce Development Company – now!

Apex Trigger in Salesforce

Apex Trigger in Salesforce

Are you looking for the best advice on Apex Triggers in Salesforce to derive more value out of your Salesforce products? If your answer is in the affirmative, this blog on Salesforce Apex Triggers.

Let us pursue this informative journey by understanding about Triggers.

What is a Trigger?

A trigger is an Apex script that executes before or after certain events occur in DML, For example, before the object record is entered into the database or after the record has been deleted. Triggers allow you to carry out custom actions before or after changes to Salesforce records. A trigger is Apex code that is executed before or after the following types of operations such as Insert, update, delete and delete. 

Two types of Apex triggers

Before trigger

This trigger is used to update or verify the value of a record before it is saved in a database.

After trigger

This trigger is used to access values of the record ​​stored in a database and use this value to make changes to other records. After trigger records are in read-only format.

Bulky Trigger

By default, all triggers in Salesforce are bulky triggers. This means you can process many records simultaneously. Bulky triggers can handle  bulk operations and single-record updates, such as the following:

  • Data import
  • Mass Fraction
  • Bulk API calls
  • The recursive apex methods

Trigger Syntax

 trigger myAccountTrigger on Account (before insert, before update) {

  CreateAccount.getAccount();

 }

  1.  myAccountTrigger – triggerName ( It is the name you would want to give your trigger).
  2. Account – Objectname (It is the object on which the action needs to be performed).
  3. before insert, before update – Trigger_events

Before insert: When using this event, the code block gets executed before a new record is inserted.

Before update: When you use this event, the code will get executed before a new record is updated in the object.

Trigger Context Variables:

isExecuting

Returns true if the current context for the Apex code is a trigger, not a Visualforce page, a Web service, or an executeanonymous() API call.

isInsert

Returns true if this trigger was fired due to an insert operation

isUpdate

Returns true if this trigger was fired due to an update operation

isDelete

Returns true if this trigger was fired due to a delete operation.

isBefore

Returns true if this trigger was fired before any record was saved.

isAfter

Returns true if this trigger was fired after all records were saved.

isUndelete

If a record is recovered from the recycle bin it returns trigger true.

new

Returns a list of the new versions of the sObject records. This sObject list is only available in insert, update, and undelete triggers, and the records can only be modified before triggers.

newMap

A map of IDs to the new versions of the sObject records. This map is only available in before update, after insert, after update, and after undelete triggers.

old

Returns a list of the old versions of the sObject records. This sObject list is only available in update and deletes triggers.

oldMap

A map of IDs to the old versions of the sObject records. This map is only available in update and deletes triggers.

size

The total number of records in a trigger invocation.

Triggers in Salesforce vs. Workflow in Salesforce

Workflow

  • It is an automated process that can shoot an action that is based on evaluation and rule criteria.
  • Performing DML operations in the workflow is not possible.
  • We can obtain a workflow over an object.
  • We can’t create a query from the database.

Trigger

  • It is a piece of code which is executed either before or after a record is updated or inserted.
  • More than 15 DML operations can be used in a single trigger.
  • More than 20 SOQLs can be used from the database in a trigger.
  • We can access triggers across an object and related to that object.

Limitations of Workflows overcome by Triggers in Salesforce

  • Workflows are not able to create or update a separate object.
  • You can’t reference certain fields when using workflows.
  • You will not have your workflow doing more than just field updates and emails.

Conclusion

Triggers in Salesforce are called Apex Triggers. A trigger in Salesforce is an Apex code that is used to perform an operation before or after a record is operated.

Want to know more about triggers? Contact our certified Salesforce Consultants now!

How to Write a Test Class for Apex Trigger?

How to Write a Test Class for Apex Trigger?

The Apex testing framework makes sure that developers can write and execute tests for all the Apex Classes and triggers in the Force.com platform. In the testing framework, the code is tested and the testing code is coded in the sandbox environment and then deployed to production Org. 

Apex Test Class Best Practices

1. Use @isTest at the Top for all the test classes.

2. Always put assert statements for negative and positive tests.

3. Utilize the @testSetup method to insert the test data into the Test class that will flow all over the test class.

4. Always make use of Test.startTest() and Test.stopTest() doing this it will increase the governor limit of the salesforce. We also use this to increase the governor’s limit.

5. Use System.runAs() method to test the functionality in user Context.

6. Do not put (seeAllData = true) in test class otherwise, use it for exceptional cases.

7. Avoid Using Hard Coding Ids anywhere in test Class or any apex class.

8. Ensure that each class has a minimum of 75% coverage and also the main functionality has been covered. If possible increase code coverage up to 95%.

9.  All class methods must be tested for at least 200 records and keep the real scenarios in mind.

10. Only one Test.startTest() and Test.stopTest() statement can be in a method, and no of  Test.startTest() and Test.stopTest() statement in any test class depend upon the test methods.

Test Class Example

@isTest

public class setOpportunityOwner 

{

    public TestMethod static void setOpportunityOwner_Method()

    {

        Opportunity opp = New Opportunity();

        opp.name = ‘Hello’;

        opp.stageName = ‘Prospecting’;

        opp.CloseDate = Date.today();

        insert opp;

        Task tk = New Task();

        tk.WhatId = opp.Id;

        tk.Subject = ‘Other’;

        tk.status = ‘Not Started’;

        tk.description = ‘New  Work’;

        Test.startTest();

        Database.SaveResult str = database.insert(tk , False);

        System.assertEquals(True, str.isSuccess());

        Test.stopTest();

    }

}

Advantages of Apex Test Classes

  • You can use Test.isRunningTest() within your code to recognize that the context of the class is Test or not. 
  • You can use this condition with OR (||) operator to enable test classes to highlight inside the Code block.
  • Utilize @TestVisible annotation to identify private members and methods inside Test Class.

Salesforce Tasks in Apex

A task in Salesforce is defined as an assigned action that is required to be done by the user to whom the task is assigned. Tasks can be related to leads, campaigns, contacts, and contracts.

Difference between WhatID and WhoID in Task

WhatID in Salesforce – It represents object type things. It can easily relate to AccountID or an Opportunity ID. The WhatId refers to nonhuman objects like accounts, campaigns, opportunities, or custom objects. WhatId occurs in several different forms that means WhatId equals to the ID of a related object. The label for WhatID is Related To.

WhoID in Task – WhoID represents people things. It can easily relate to Lead ID or a Contact ID. It refers to human-like a lead and a contact. WhoID equals to a contact’s ID or a lead’s ID. The label for WhoID is Name.

Conclusion

The Apex testing framework is an innovative tool enables you to write and execute your Apex Code. Test class code is developed in a Sandbox environment and deployed to a production org. Apex unit tests make sure that your Apex classes and triggers perform as expected. By following the above practices, you can easily write Apex triggers and classes in Salesforce and hence make your system both manageable and Scalable.

In order to learn more about Apex Triggers, check our latest webinar video on 

Change Data Capture & Asynchronous Apex Triggers presented by Sachin Arora, the Scrum Master and Principal Solutions Architect at Cloud Analogy

Mulesoft leverages Istio to manage and secure Microservices

Mulesoft leverages Istio to manage and secure Microservices

Mulesoft, a leading platform provider for developing application networks, has introduced Anypoint Service Mesh, a modern and innovative solution that makes it easy for businesses to govern, manage, and protect microservices.

Anypoint Service Mesh enhances security and reliability for deploying microservice-based apps, irrespective of the deployment model or any language. It also helps development teams get rid of any obsolete custom code.

With Anypoint Service Mesh, businesses will be able to discover and promote microservices in a marketplace, enabling developers within an organization to discover and reutilize them. Furthermore, IT departments will now be able to create and maintain the highest standards of security and control. 

With this groundbreaking new version of the Anypoint Platform, businesses can take full advantage of microservices for faster innovation, deliver more personalized customer experience, and improve operational efficiency.

The Emergence of Microservices

With Microservices, businesses can now quickly create great customer experience by providing data and functionality as a bundle of loosely coupled services. Its actual value comes from combining various microservices to meet business needs. With microservices, businesses would now be able to quickly respond to ever-changing customer needs and requirements and offer services that create a competitive advantage.

Nevertheless, more and more microservices are created and organized for business opportunities and business ended-up with complex environments that can be expensive and difficult to manage.

Loosely coupled services need an understanding of interactions between services to minimize the burden of changes later on. For making changes, regardless of functional or security considerations, or scalability reasons, a number of dependent services and applications must be regenerated. This leads to errors, unexpected side effects, and delays. Furthermore, this increases the need to secure path-dependency in networks. This complexity can suppress innovation and destroy microservice capabilities.

Anypoint Service Mesh: An extension of the API-led approach to the microservice architecture

Businesses can only utilize microservice architecture by removing custom code and the complexity of managing different services. Developers must also be able to discover and reuse microservices developed by other teams – destroying organization silos to streamline the capabilities of speed, flexibility, and agility from microservices.

As more and more applications are distributed and stored, a Service Mesh is an important element of the microservice infrastructure, increasing the durability and security of applications. However, Service Mesh does not address all problems and challenges in the microservice lifecycle independently. Organizations must continue to easily publish and reuse microservices throughout teams. 

In addition, Service Mesh offers these and more benefits for a number of microservices across the specific deployment. Despite the language or deployment model, businesses require an innovative way to review and manage all services.

Benefits of Mulesoft Anypoint Platform’s single control plane

  • Find out which microservices are available and how they operate in synchronization.
  • Visualize microservice dependencies using application network diagrams.
  • Increase acceptance and reuse by adding Microservices to the Anypoint Exchange.
  • Centralized management and scaling of microservice architecture.
  • Ensuring flexibility between services and Istio’s traffic control policy.
  • Estimate and maximize the performance of all microservices through API Analytics. 
  • Enable standard security.
  • With Istio implement TLS for all traffic and register policies to create a zero-trust network.
  • Automatic access control on microservices outside the service mesh.

MuleSoft Anypoint Platform helps businesses take advantage of the architecture by creating API-based connectivity for microservices. An API-based approach allows businesses to open the value of their existing API services and innovate quickly while maintaining the security and control of important company data or processes. It provides the concept of providing a flexible operational model and developing reuse and discovery for the entire organization through the application network. This increases the speed and flexibility of the business processes to create a competitive edge.

By expanding the Anypoint platform to any microservice with Istio, Anypoint Service Mesh brings the principles of openness, management, and security to microservices. 

Accessibility Mode in Salesforce

Accessibility Mode in Salesforce

Salesforce Web Accessibility ensures that people with disabilities can recognize, understand, navigate, interact, and contribute to the applications that are available to the world at large. This means the pages should be responsive, functional, understandable, and robust at the same time. It includes providing keyboard interactions alternatives for all mouse-based actions, correctly identifying all fields of forms and buttons, providing textual alternatives for all images, videos, icons, and SVG files, and creating components correctly to define their identities, operating models, and more.

Salesforce is committed to providing high-quality, on-demand enterprise applications that are accessible to all individuals, including users working with assistive devices, such as speech recognition software and screen readers.

What is Accessibility Mode in Salesforce?

Salesforce Accessibility Mode is a type of interface mode that is designed for voice recognition and screen reader software. By using this accessibility mode on Salesforce.com, you can make work easily and efficiently with Salesforce. Furthermore, you can create reports and dashboards with voice recording software in Accessibility Mode.

How to enable Accessibility Mode in Salesforce.com?

Follow these steps to enable Accessibility Mode in SFDC:

Step 1: Go to Your name>>My settings>>Display & Layout>>Accessibility.

Step 2: Click on Accessibility as shown above.

Step 3: Now you are redirected to a new page where you have to check Accessibility mode checkbox.

Step 4: Enable Accessibility mode checkbox and click on the Save button to save the settings.

Features of Accessibility Modes
1: You can access setup pages through a  Setup link at the top of the page.

2: The Dropdown menu contains a Go button that lets you navigate to the option you choose in the dropdown list.

3: The menu button appears as a drop-down list with the “Go” button.

4: Overlay pages are displayed as separate popup windows.

5: HTML editors are replaced by text boxes. This text box only accepts HTML and does not recognize the plaintext entry. To separate content, you should use paragraphs or line-break HTML tags.

6: While accessing a dashboard, the View Dashboard Auto-Complete filter is replaced with the standard drop-down menu.

7: The Edit Columns link on the Manage Members page, accessible by Manage Members dropdown on a campaign detail page. The Edit Columns overlay is replaced by a standard setup page.

8: Clicking a requested meeting in the Open Activities related list and in some, the list views doesn’t open the meeting detail page. Instead of this, a dialog opens that guides you to contact the meeting organizer for the requested meeting details.

9: The Turn My Email On the dropdown list on a Chatter group displays as a Chatter Email Settings link that opens your settings for receiving Chatter email.

Conclusion

In a nutshell, the Salesforce Accessibility Mode is a feature that provides support for specially challenged people like blind or visually impaired people. It allows them to read and interpret the provided information either by converting text to speech or vice versa.