MOHIT
IndividualForum Replies Created
-
MOHIT
MemberApril 24, 2020 at 1:20 pm in reply to: In which scenario we should use try catch in Test class in Salesforce?when a test is deliberately provoking an exception and you want to check the exception, then a try/catch in the test is needed. A common case of this is where you are testing that a trigger is using addError to report an error back to a user:
try {
...
System.assert(false, 'Exception expected');
} catch (DMLException e) {
System.assert(e.getMessage().contains('expected message'), 'message=' + e.getMessage());
}
Note the test should fail if the exception isn't thrown, hence the System.assert(false, 'Exception expected'); -
MOHIT
MemberApril 24, 2020 at 1:08 pm in reply to: Can we use seeAllData = true in Test class in Salesforce?Yes, You can Use the isTest annotation to define classes or individual methods that only contain code used for testing your application. The isTest annotation is similar to creating methods declared as test Method.
IsTest(SeeAllData=true)Annotation -
Streaming API enables streaming of events using push technology and provides a subscription mechanism for receiving events in near real time. The Streaming API subscription mechanism supports multiple types of events, including PushTopic events, generic events, platform events, and Change Data Capture events.
-
An authentication provider lets your users log in to your Salesforce org using their login credentials from an external identity provider, such as Facebook, Google, LinkedIn, and Twitter. Salesforce provides default authentication providers where Salesforce manages the required configuration values.
-
A connected app is a framework that enables an external application to integrate with Salesforce using APIs and standard protocols, such as SAML, OAuth, and OpenID Connect. Connected apps use these protocols to authenticate, authorize, and provide single sign-on (SSO) for external apps. The external apps that are integrated with Salesforce can run on the customer success platform, other platforms, devices, or SaaS subscriptions. For example, when you log in to your Salesforce mobile app and see your data from your Salesforce org, you’re using a connected app.
-
MOHIT
MemberApril 22, 2020 at 2:16 pm in reply to: What are the things that can be customized on-page?we can customize different things on page layout like, Fields, Buttons, Custom Links and Related Lists. We can also create sections.
-
MOHIT
MemberApril 22, 2020 at 2:15 pm in reply to: Difference between Process-builder and trigger in Salesforce?1. Process Builders cannot handle before DML It executes after a record has been created or updated. Whereas Apex triggers can handle both before and after DML operations.
2. Process Builder cannot handle delete and undelete DML. Whereas Apex triggers can handle all DML operations.
3.Validation: Processes do not trigger validation rules and can, therefore, invalidate data.
An error reported in Process Builder is more generic which makes it difficult to find the origin of the error. With Apex triggers, exception handling can be made more specific.
4. It is all or none in case of Process Builder failure. But with Apex triggers partial success is possible.
5. Whenever a particular use case is not possible using Process Builder, consider using Apex triggers. For example, consider the below use case:-
A custom field on a Parent object which is based on the field related to the max (roll-up) among the child records. Since roll-up functionality involves insert, update, delete and undelete operations, using an Apex trigger is the best option in this scenario. -
MOHIT
MemberApril 22, 2020 at 2:13 pm in reply to: Difference between Custom Setting and Custom meta data in salesforce ?Only a few cases in which Custom Settings more useful. Custom Metadata types have a number of advantages that make them the correct choice to implement almost always.
Advantages to Custom Metadata:
1. Most importantly, as stated before, they are Metadata and thus deployable! No more annoying configuration after deployment, which you have to do with Custom Settings. They're also refreshed to sandboxes, so you don't need to create Apex classes to generate your default Custom Setting records.
2. They have WAY more options that Custom Settings: picklist fields, long text areas (in Spring '17), page layouts, and validation rules (though as of Winter '17 these are not deployable either by change set or by migration tool - weird!)
3. The beauty that is Metadata Relationships! You can create lookups between Custom Metadata objects. Additionally, you can create an Object Definition lookup - so you're relating Custom Metadata to Standard or Custom Object definitions. Additionally, in Spring '17 you can create a dependent lookup to a Field Definition on that object. (Documentation here)
4. Custom Settings have the same permission to edit the records and to edit the configuration. Both can be done with the "Configure Application" permission. With Custom Metadata, you can edit the records with "Configure Application" but you require "Author Apex" to edit the configuration.
5. Custom Metadata types have a lot of additional features specific to developing managed packages. You can configure the visibility and editability of fields an objects both by the org that installs the package and by upgrades to the package.
Reason why you would use custom settings instead:
============
1. Hierarchies - Custom metadata types do not purport to replace hierarchy custom settings which allow you to vary values based on users and profiles across the org. These custom settings can also be referenced in formulas, so can be used in formula fields, validation rules, workflow rules, and visualforce. (Documentation here)
2. Web service credentials - If you’re using test credentials in a sandbox, you don’t have any reason to deploy them to production. More importantly, if you create a sandbox, you don’t want the config for the production versions of your Web Services being created automatically and used by default. However, it is usually best to use Named Credentials for this.
3. Custom setting records’ values can be edited in code, while custom metadata cannot. If you will need to modify your configuration programmatically for any reason (say you’re creating a config console for the user), custom metadata will not work. -
MOHIT
MemberApril 21, 2020 at 3:30 pm in reply to: What are the benefits of IoT Cloud in Salesforce?You Can understand the benefits like this:
Now imagine you are an energy provider who is selling smart meters. You have the traditional data about the bill payer, as we have outlined above, and now you can combine that with real-time data of energy usage. You might find that one of your clients who lives within a mile of several others uses a lot more gas to heat their properties than the others. Perhaps their property could do with an insulation package?
Or perhaps you work for a bus company in a busy city? In this sense, the bus itself becomes the device transmitting information on its location to Salesforce IoT. Then it is updated on your App and a client, waiting at a stop, can see how far away it is before it reaches them. This essentially allows your clients to have more control of their time management as they will be better informed about when they need to leave the house to reach the stop in time.
The two examples above show how the IoT combined with contextualised data can provide better identification for revenue opportunities as well as better customer service. But it can actually do more than that. Feasibly, Salesforce IoT can change the way you do business altogether. -
MOHIT
MemberApril 21, 2020 at 3:28 pm in reply to: What is the limitation of IoT Cloud in Salesforce?These are the Limitations of IoT Cloud:
1. Security vulnerabilities
Huge volumes of data mean not only expanding customer profiles, but also the necessity to protect these data. Big data from customers’ connected things can be stolen and used by competitors and cybercriminals. It generates additional concerns about how to secure data and connections, introduce effective but not tedious procedures of device and user identification.
2. Customers’ concerns about data privacy
Customers can feel unprotected knowing that someone is constantly gathering the data about them. However, it can be agreed with the customers whether they are ready to give personal data to product and service providers.
3. Flexibility limitations
With low code approach, Salesforce enables a wide range of business users with no serious programming skills to build their own customized apps using preconfigured elements (for example, dashboards and widgets) that perform certain operations. But what if the functionality of these elements is not enough? Some users might need more access to the platform’s programming components to tune the apps that cover their specific business needs, and in this case, the possibility of using only preconfigured elements can be more a limitation than a benefit. -
The idea of Salesforce is to enrich the provided services with the benefits of the big data collected from connected devices and enable CRM users (not prepared for serious coding) to build and customize their own apps to manage these data.
To store and process such data, Salesforce provides the platform called Salesforce IoT Cloud. It is powered by Thunder which is an event-processing engine designed to capture, filter and respond to events in real time. -
Audit Fields in Salesforce are special fields that track information about your records that can be valuable for audit purposes. Typically these fields include:
CreatedByID
CreatedDate
LastModifiedbyID
LastModifiedDate -
MOHIT
MemberApril 20, 2020 at 3:13 pm in reply to: How do I update my identity provider certificate in Salesforce?Configure a domain using My Domain and deploy it to all users. For instructions, see Set Up a My Domain Name.
From Setup, enter Identity Provider in the Quick Find box, select Identity Provider, and click Enable Identity Provider.
By default, a Salesforce identity provider uses a self-signed certificate generated with the SHA-256 signature algorithm. If you’ve already created self-signed certificates, select the certificate to use when securely communicating with other services.
If you want to use a CA-signed certificate instead of self-signed certificate, follow these steps.
Create and import a CA-signed certificate. For instructions, see Generate a Certificate Signed by a Certificate Authority.
From Setup, enter Identity Provider in the Quick Find box, then select Identity Provider.
Click Edit, and then select the CA-signed certificate.
Click Save.
After you enable Salesforce as an identity provider, you can create connected apps to provide access to service providers. -
MOHIT
MemberApril 20, 2020 at 3:10 pm in reply to: What is the difference between SSO and Social sign-on in salesforce?Social sign-on
Social login is a form of single sign-on using existing information from a social networking service such as Facebook, Twitter or Google+, to sign into a third party website instead of creating a new login account specifically for that website.
Single sign-on
Single sign-on (SSO) is a session and user authentication service that permits a user to use one set of login credentials (e.g., name and password) to access multiple applications. SSO can be used by enterprises, smaller organizations, and individuals to mitigate the management of various usernames and passwords. -
MOHIT
MemberApril 18, 2020 at 3:46 pm in reply to: What is difference between lightning app and connected app in Salesforce?Connected application is basically a mechanism to iframe your external application in a secure manner inside Salesforce, allowing you to securely post and get data from Salesforce into your application .
Lightning components is a JavaScript framework that you use to build components which can be surfaced to users using the application builder.
For lightning components your application ui resides inside the platform.You have JavaScript controller associated with your component and that allows you to hook to Salesforce server side logic.For your use case of you we're to connect to your web app from lightning components ,you will need to expose a serve API that Salesforce server can call to . -
LayoutColumn represents the items in a column within a layout section.
layoutItems : LayoutItem[] : The individual items within a column (ordered from top to bottom).
reserved : string : This field is reserved for Salesforce. The field resolves an issue with some SOAP libraries. Any value entered in the field is ignored. -
LayoutItem represents the valid values that define a layout item. An item must have only one of the following values set: component, customLink, field, s-control, page, analyticsCloudComponent, or reportChartComponent.
-
JSON is a format that encodes objects in a string. Serialization means to convert an object into that string, and deserialization is its inverse operation.
When transmitting data or storing them in a file, the data are required to be byte strings, but complex objects are seldom in this format. Serialization can convert these complex objects into byte strings for such use. After the byte strings are transmitted, the receiver will have to recover the original object from the byte string. This is known as deserialization. -
MOHIT
MemberApril 16, 2020 at 2:49 pm in reply to: What is the relation between Opportunity and opportunityLineItem in Salesforce?Opportunity:
Opportunity object stores data of potential sales and pending sales.
One opportunity can only have one pricebook.
One opportunity can contain one or many line items.
Product:
Product object is a catalogue of items or services for sales.
A product may contain one or more different sets of prices (PriceBookEntry).
OpportunityLineItem:
List of products that link with opportunity containing data on types of products and respective prices.
One opportunity line item can only be linked to one opportunity.
One opportunity line item can only be linked to one price book entry. -
Salesforce lead assignment rules defines the administrators to assign a lead to users and queues based on criteria. A lead can be generated either by manually or generated from the web.
-
MOHIT
MemberApril 15, 2020 at 3:08 pm in reply to: What is the maximum duration for debug log we can set in Salesforce?24 hours.
-
MOHIT
MemberApril 15, 2020 at 3:07 pm in reply to: How to create an attachment record in Salesforce?Create an Attachment
If your form contains a file upload field, you can attach the uploaded files to most Salesforce objects by creating a dependent Attachment object.
Create the parent object for the Attachment object.
Click the Add an Object dependent on button, and select the Attachment object from the list.
You'll need to map the ID of the parent object to the Attachment object's Parent ID. To do this, map the Parent ID in the field mapping section. Note that this is a required field.
The other required fields for the Attachment object, "File Name" and "Body," will also appear in the Field Mapping section. You will need to map both of these fields to the file upload field in your form.
If you are running into difficulty opening attachments in Salesforce, try mapping your Salesforce Attachment FileType field to the Upload Field in your form as well. -
Hi,
Examples of Custom Field Types are:
AutoNumber : Automatically assigns a unique number to each record. The maximum length of any auto-number field is 30 characters, 20 of which are reserved for prefix or suffix text. Not available for external objects.
Checkbox : Allows users to check a box, indicating a true or false attribute of a record. When using a checkbox field for a report or list view filter, use “True” for checked values and “False” for unchecked values. The Data Import Wizard and the weekly export tool use “1” for checked values and “0” for unchecked values.
Currency : Allows users to enter a currency amount. The system automatically formats the field as a currency amount. This can be useful if you export data to a spreadsheet application. Not available for external objects.
Date: Allows users to enter a date or pick a date from a popup calendar. In reports, you can limit the data by specific dates using any custom date field.
Date/Time: Allows users to enter a date or pick a date from a popup calendar and enter a time of day. They can also add the current date and time by clicking the date and time link next to the field. The time of day includes AM or PM notation. In reports, you can limit the data by specific dates and times using any custom date field. -
MOHIT
MemberApril 14, 2020 at 4:28 pm in reply to: Can you customize apex directly in production org?Apex cannot be customised in a production Org, it must be changed and deployed through a sandbox and meet test coverage. Visualforce, on the other hand, may be customised directly in production (Although this is not best practice)
-
A user license determines the baseline of features that the user can access. Every user must have exactly one user license. You assign user permissions for data access through a profile and optionally one or more permission sets.
Salesforce offers these license types.
Standard User Licenses
Chatter User Licenses
Communities User Licenses
Service Cloud Portal User Licenses
Sites and Site.com User Licenses
Authenticated Website User Licenses