Parul
IndividualForum Replies Created
-
Hi
It's a read only field, the value of formula filed evaluate from expression defined by us. If we update any value in the expression, it automatically updates formula field value. We can create formula fields in both standard and custom object.
We can return formula result in 7 ways those are:
1. Checkbox: Calculate a boolean value
2. Currency: Calculate a dollar or other currency amount and automatically format the field as a currency amount.
3. Date: Calculate a date, for example, by adding or subtracting days to other dates.
4. Date/Time: Calculate a date/time, for example, by adding a number of hours or days to another date/time.
5. Number: Calculate a numeric value.
6. Percent: Calculate a percent and automatically add the percent sign to the number.
7. Text: Create a text string, for example, by concatenating other text fields.Thanks
-
Parul
MemberSeptember 14, 2018 at 1:17 pm in reply to: Difference between synchronous and asynchronous in apexSynchronous:
In a Synchronous call, the thread will wait until it completes its tasks before proceeding to next. In a Synchronous call, the code runs in single thread.
Example:
Trigger
Controller Extension
Custom ControllerAsynchronous:
In a Asynchronous call, the thread will not wait until it completes its tasks before proceeding to next. Instead it proceeds to next leaving it run in separate thread. In a Asynchronous call, the code runs in multiple threads which helps to do many tasks as background jobs.
Example:
Batch
@future AnnotationThanks
-
Parul
MemberSeptember 14, 2018 at 1:15 pm in reply to: What are the different components of WSDL in Salesforce?There are different components of WSDL are:
- Definition − It is the root element of all WSDL documents.
Data types − These are in the form of XML schemas.
Message − It is an abstract definition of the data, in the form of a message which can be either as a document or as arguments.
Operation − It is the abstract definition of the operation for a message.
Port type − It is set of operations mapped to one or more end-points, also defining the collection of operations for a binding.
Binding − It is the protocol and data formats for the operations that are defined for a particular port type.
Port − It is a combination of a binding and a network address.
Thanks
- Definition − It is the root element of all WSDL documents.
-
Parul
MemberSeptember 14, 2018 at 12:16 pm in reply to: What is the difference between SLDS and Aura Components?SLDS
By Using SLDS We can make our apps responsive and can also provide Look and feel similar to the Lightning Experience.
It provides a robust grid system because of which It is easier to build responsive layouts that works elegantly across different screen sizes.
Aura Components
Using Aura Framework We can build apps completely independent of the Data present in our Salesforce org.
When we use Lightning Components Framework We do not need to worry about the optimization of our apps for different devices as Components take care of that by themselves.
Thanks.
-
Parul
MemberSeptember 14, 2018 at 9:42 am in reply to: What is the use of Savepoint in Salesforce Apex?Savepoints gives you extra transaction control over your business logic flow. Assume you have a custom lead conversion page where you create opportunity and account on conversion. But what if opportunity creation fails after creation of account. Here comes savepoints using which you can rollback the changes (i.e. creation of account) to previous state of transaction.
Savepoints hold the state of the database at that time which gives you extra transactional control to rollback your changes such as (insertion,updation of records) upon any failure in transaction.
Thanks.
-
Parul
MemberSeptember 14, 2018 at 9:34 am in reply to: In how many ways we can invoke the Salesforce Apex Class?we can invoke the Salesforce Apex Class:
1. Visual force page
2. Web Service
3. Triggers
4. Email services
Thanks.
-
Property definitions include one or two code blocks, representing a get accessor and a set accessor:
- The code in a get accessor executes when the property is read.
- The code in a set accessor executes when the property is assigned a new value.
Public class BasicClass {
// Property declaration
access_modifier return_type property_name {
get {
//Get accessor code block
}
set {
//Set accessor code block
}
}
}Thanks
-
Parul
MemberSeptember 14, 2018 at 9:26 am in reply to: Is there any limit on number of triggers defined on an object?Hi,
No, you can have n number of triggers in a single object and the best practice is to have only one trigger per object.
Thanks.
-
Parul
MemberSeptember 14, 2018 at 9:25 am in reply to: How many Controllers can be used on a single Salesforce visualforce Page?Hi,
We can use two controllers on a single salesforce visualforce page. One is controller and for custom functionality, we can use Controller extension.
Thanks.
-
Parul
MemberSeptember 14, 2018 at 9:20 am in reply to: What are the different methods in Salesforce Batch Apex class?Start method
The start method is called at the beginning of a batch Apex job.
This method is Used to collect the records or objects to pass to the interface method execute.
This method returns either a Database.QueryLocator object or an Iterable that contains the records or objects passed into the job.
Query executed in the start method will return maximum 5,00,00000 records in a transaction.
execute method:Execute method
The execute method is called for each batch of records passed to the method.
This method is used for do all the processing for data.
This method takes the following: A reference of Database.BatchableContext object.
A list of sObject records.
Batches of records are not guaranteed to execute in the order they are received from the start method.
finish method:Finish method
The finish method is called after all batches are processed.
This method is used to send confirmation emails or execute post-processing operations.
This method takes only one argument a reference of Database.BatchableContext object.
This method is called when all the batches are processed.Thanks
-
Parul
MemberSeptember 14, 2018 at 9:09 am in reply to: What is the advantage of using Database Class over Statement Method to execute DML?Use DML statements if you want any error that occurs during bulk DML processing to be thrown as an Apex exception that immediately interrupts control flow (by using try. . .catch blocks). This behavior is similar to the way exceptions are handled in most database procedural languages.
Use Database class methods if you want to allow partial success of a bulk DML operation—if a record fails, the remainder of the DML operation can still succeed. Your application can then inspect the rejected records and possibly retry the operation. When using this form, you can write code that never throws DML exception errors. Instead, your code can use the appropriate results array to judge success or failure. Note that Database methods also include a syntax that supports thrown exceptions, similar to DML statements.
Thanks
-
Parul
MemberSeptember 14, 2018 at 8:18 am in reply to: What is the meaning of statelessness in terms of RESTful web services in Salesforce?Statelessness means that every HTTP request happens in complete isolation. When the client makes an HTTP request, it includes all information necessary for the server to fulfill that request. The server never relies on information from previous requests. If that information was important, the client would have sent it again in this request.
Thanks.
-
Parul
MemberSeptember 14, 2018 at 6:48 am in reply to: What is the use of AuraEnabled Annotation in Salesforce?Hi
Use @AuraEnabled on Apex class static methods to make them accessible as remote controller actions in your Lightning components.
Use @AuraEnabled on Apex instance methods and properties to make them serializable when an instance of the class is returned as data from a server-side action.Thanks.
-
The @HttpPost annotation is used at the method level and enables you to expose an Apex method as a REST resource. This method is called when an HTTP POST request is sent, and creates a new resource. To use this annotation, your Apex method must be defined as global static.
Thanks.
-
Parul
MemberSeptember 14, 2018 at 6:37 am in reply to: What are context variables in Salesforce Triggers?All triggers define implicit variables that allow developers to access run-time context. These variables are contained in the System.
1) isExecuting Returns true if the current context for the Apex code is a trigger, not a Visualforce page, a Web service, or anexecuteanonymous() API call.
2) isInsert Returns true if this trigger was fired due to an insert operation, from the Salesforce user interface, Apex, or theAPI.
3) isUpdate Returns true if this trigger was fired due to an update operation, from the Salesforce user interface, Apex, or theAPI.
4) isDelete Returns true if this trigger was fired due to a delete operation, from the Salesforce user interface, Apex, or theAPI.
5) isBefore Returns true if this trigger was fired before any record was saved.
6) isAfter Returns true if this trigger was fired after all records were saved.
7) isUndelete Returns true if this trigger was fired after a record is recovered from the Recycle Bin (that is, after an undelete operation from the Salesforce user interface, Apex, or the API.)
8) new Returns a list of the new versions of the sObject records.Note that this sObject list is only available in insert and update triggers, and the records can only be modified in before triggers.
9) newMap A map of IDs to the new versions of the sObject records. Note that this map is only available in before update, after insert, and after update triggers.
10) old Returns a list of the old versions of the sObject records.Note that this sObject list is only available in update and delete triggers.
11) oldMap A map of IDs to the old versions of the sObject records.Note that this map is only available in update and delete triggers.
12) size The total number of records in a trigger invocation, both old and new.Thanks.
-
Dynamic Apex enables developers to create more flexible applications by providing them with the ability to “Access sObject and field describe information”, “Write Dynamic SOQL Queries”, “Write Dynamic SOSL Queries” and “Dynamic DML”.
Thanks.
-
Parul
MemberSeptember 14, 2018 at 5:17 am in reply to: How to delete Time based workflow if there is already an action scheduled in Salesforce?If you want to delete the Time based workflow if there is already an action scheduled in Salesforce then you need to remove all schedule action from Time-Based Workflow (Monitor) queue. Then you can deactivate or delete the workflow
Thanks
-
Parul
MemberSeptember 14, 2018 at 5:16 am in reply to: Time-Dependent Action when a Salesforce record is created or edited?No we cannot add at the time of when a Salesforce record is created or edited because action must be perform on some criteria so it update the record everytime.
Thanks
-
Parul
MemberSeptember 14, 2018 at 5:14 am in reply to: What are the elements of a SOAP message in Salesforce?elements of a SOAP message in Salesforce
urn: LoginScopeHeader: element concern the authentication of Self-Service and Customer Portal users.
urn:login: element in the message body.
urn:password: element in the password body.
Thanks
-
Parul
MemberSeptember 14, 2018 at 5:09 am in reply to: Why should we use it from Command Line Interface Data Loader?Data Loader is a tool provide by the Salesforce to insert, upsert, update, export and delete data in bul but if there is a scenario to update data at particular time then we need command line.
Note: Data Loader is a great native tool provide by the Salesforce to insert, upsert, update, export and delete data.
Thanks
-
Parul
MemberSeptember 14, 2018 at 5:06 am in reply to: What is the purpose and format of URI in REST architecture?REST is an architectural style for networked hypermedia applications, it is primarily used to build Web services that are lightweight, maintainable, and scalable. A service based on REST is called a RESTful service. REST is not dependent on any protocol, but almost every RESTful service uses HTTP as its underlying protocol. In this article, I examine the creation of RESTful services with HTTP.
A URI (Uniform Resource Identifier) is a sequence of characters that identifies a logical or physical resource.
A URI is of following format −
<protocol>://<service-name>/<ResourceType>/<ResourceID>
Thanks
-
Parul
MemberSeptember 14, 2018 at 5:02 am in reply to: What are the different types of collections in Salesforce Apex?The collection is the type variables which can store multiple numbers of records. It can increase and decrease dynamically.
There are 3 types of collection
List Collection
Set Collection
Map CollectionThanks
-
Hi
HttpPatch Annotation.
The @HttpPatch annotation is used at the method level and enables you to expose an Apex method as a REST resource. This method is called when an HTTP PATCH request is sent, and updates the specified resource. To use this annotation, your Apex method must be defined as global static.
THanks
-
Parul
MemberSeptember 14, 2018 at 4:59 am in reply to: Can a trigger make a call to Salesforce Apex callout method?An Apex trigger can execute a callout when the callout is invoked within a method defined as asynchronous: that is, defined with the @future keyword. The @future annotation signifies that the Apex method executes asynchronously. For more information on the @future annotation.
Future methods execute asynchronously i.e. one does not need to wait for a response. The thing to keep in mind is, a future method can have native calls, as well as, they can make a call out to an external web service and hence, in order to enable the future method to allow callouts, an extra parameter “Callout=true” needs to be passed.
THanks
-
Parul
MemberSeptember 14, 2018 at 4:57 am in reply to: What is the difference between Render, Rerender And RenderAs attributes of Visualforce?Rendered Attribute :-
The rendered attribute is a Boolean value, it has true as default value and based on the value it will show or hide a page block or a field on the VF pages.
rendered= "true or flase"
Rerender Attribute :-
Rerender Attribute is used to refresh particular section on page to update latest data received from salesforce after action method call is done. You need to give the id of page section in attribute as shown below
rerender = "pageblockId"
Renderas Attribute :-
If you want to render your page as PDF, so this is the right option to go ahead with it and most importantly only PDF is the supported content converter. Setting this Renderas attribute to “pdf” renders the page as a PDF.
Renderas= "pdf"
Thanks