Forum Replies Created

Page 12 of 21
  • Avnish Yadav

    Member
    September 14, 2018 at 1:23 pm in reply to: In how many ways we can invoke the Salesforce Apex Class?

    Hello,

    Few way to invoke salesforce class are-

    1. Using Visualforce Page
    2. Using Lightning Component
    3. Using External Call
    4. Using Console

    and many more.

    Thanks.

  • Avnish Yadav

    Member
    September 14, 2018 at 1:20 pm in reply to: why formula fields are useful

    Hello Anjali,

    The formula field is useful as we can perform many tasks without writing a single code in Apex.

    Thanks.

  • Avnish Yadav

    Member
    September 14, 2018 at 1:18 pm in reply to: What are expressions used in pages to bind in controllers?

    Hello Anjali,

    Using methods we can bind.
    Getter: Will return value from controller to Visualforce page
    Setter: Will pass value from Visualforce page to the controller
    Action: Will redirect to another page.

    Hope this will help you.

    Thanks.

  • Avnish Yadav

    Member
    September 14, 2018 at 1:16 pm in reply to: Limitations of using a Savepoint in apex

    Hello,

    Limitations of using a Savepoint are :-

    • If you set more than one savepoint, then roll back to a savepoint that is not the last savepoint you generated, the later savepoint variables become invalid.

    • Each savepoint you set counts against the governor limit for DML statements.
    • Static variables are not reverted during a rollback. If you try to run the trigger again, the static variables retain the values from the first run.
    • Each rollback counts against the governor limit for DML statements. You will receive a runtime error if you try to rollback the database additional times.
    • The ID on an sObject inserted after setting a savepoint is not cleared after a rollback.

    Thanks.

  • Avnish Yadav

    Member
    September 14, 2018 at 1:14 pm in reply to: What Is Property in Salesforce Apex?

    Hello,

    When u used property u can control get, set, access.

    In this example, if accountList = null and you try to get this value, at first accountList queried and return you list of account.
    `
    public Account[] accountList {
    get {
    if (accountList == null) {
    accountList = [SELECT Id, Name FROM Account];
    }

    return accountList;
    }
    }
    `

    Tracking value changes. In this example when you set a or b value, sum property recalculate automaticaly.
    `
    public Integer sum {
    get;
    set;
    }

    public Integer a {
    get {
    if (a == null) a = 0;
    return 0;
    }

    set {
    sum = a + b;
    }
    }

    public Integer b {
    get {
    if (b == null) b = 0;
    }

    set {
    sum = a + b;
    }
    }
    `
    and more other examples.

    Thanks.

  • Avnish Yadav

    Member
    September 14, 2018 at 12:55 pm in reply to: Is there any limit on number of triggers defined on an object?

    Hello,

    We define one trigger per Object as it best practice but you can define n number of the trigger on one objects.

    Thanks.

  • Hello,

    You can use only one controller at a times but for extensions it depends on you.

    Thanks.

  • Hi,

    Meaning of statelessness in terms of RESTful web services means that every request is independent of each other means server does not remember the previous state.

    Thanks.

  • Avnish Yadav

    Member
    September 14, 2018 at 12:46 pm in reply to: What is the use of AuraEnabled Annotation in Salesforce?

    Hello,

    We use AuraEnabled Annotation in Salesforce so that particular method is available for the Lightning component in Salesforce.

    Thanks.

  • Avnish Yadav

    Member
    September 14, 2018 at 12:44 pm in reply to: What is the use of HTTP POST in Salesforce?

    Hey,

    We can use HTTP POST in Salesforce to push or create new resources.

    Thanks.

  • Avnish Yadav

    Member
    September 14, 2018 at 12:40 pm in reply to: What are different chart types available for Dashboards?

    Hello Anurag,

    Different Salesforce Dashboard Components are Charts, Gauges, Tables, Metrics and Visualforce Pages.

    Chart:- In Chart component, Report data is displayed in different chart types like Horizontal bar chart, vertical bar chart, line chart, pie chart, Donut chart and Funnel Chart.

    Gauge:- In gauge component, the data show how far you are from reaching a goal. Gauge component types may be used to show a single value that is to be shown as a part of a range of custom set values. Here the ranges that can be set can represent, say, low, medium, and high values, and the value from the report plotted accordingly.

    Metric:- Metric component types may be used to show a single value to display.

    Table:– Table component types may be used to show a set of report data in column form.

    Visualforce page:- In addition to the standard types, Visualforce page component types may be used to create a custom component type and present information in a way not available in the standard dashboard component types.

    Thanks.

  • Avnish Yadav

    Member
    September 14, 2018 at 9:24 am in reply to: What are the different methods in Salesforce Batch Apex class?

    Hey,

    The different methods in Salesforce Batch Apex class -

    1. start() method
    2. execute() method
    3. finish() method

    Here is the syntax of simple apex batch class:-
    `
    global class SimpleBatch implements Database.Batchable{

    global Database.QueryLocator start(Database.BatchableContext BC) {
    //
    }

    global void execute(Database.BatchableContext BC, List records) {
    //
    }

    global void finish(Database.BatchableContext BC){
    //
    }

    }
    `

    Thanks.

  • Hi,

    Because the Database class provides methods not available as DML statements, such as methods transaction control and rollback, emptying the Recycle Bin, and methods related to SOQL queries.

    Thanks.

  • Avnish Yadav

    Member
    September 14, 2018 at 6:32 am in reply to: What is the purpose and format of URI in REST architecture?

    Hey,

    The purpose of URI in REST is to locate the resources on server.

    And the format of URI in REST is-

    <protocol>://<service-name>/<ResourceType>/<ResourcrceID>

    Thanks.

  • Hey,

    No, it is not possible.

    Thanks.

  • Avnish Yadav

    Member
    September 13, 2018 at 1:54 pm in reply to: Accessing Visualforce Components values into a Javascript

    Hello Anurag,

    I think you have to use document.getElementById('{!$Component.LabelName}') to access visualforce components values into a JavaScript.

    Thanks.

  • Avnish Yadav

    Member
    September 13, 2018 at 1:52 pm in reply to: Give an example of a standard object that’s also junction object.

    Hey, Parul can you explain, how opportunity product behave as junction object because opportunity product is not directly related to product.

    Thanks.

  • Avnish Yadav

    Member
    September 13, 2018 at 1:47 pm in reply to: How to ensure FLS while working with Lightning Component?

    Hello Prachi,

    FLS is ensured by manually or by lightning Data Service.

    Thanks.

  • Hello Prachi,

    Export :  It is used to export the Salesforce Data(excluding recycle bin's data) into your local  system.

    Export All :  It is used to export the Salesforce Data(including recycle bin's data) into your local system.

    Thanks.

  • Avnish Yadav

    Member
    September 13, 2018 at 1:42 pm in reply to: use lightning component as Tab like custom object

    Hello Prachi,

    We use force:appHostable Interface for lightning component as Tab.

    Thanks.

  • Avnish Yadav

    Member
    September 13, 2018 at 1:33 pm in reply to: display related records in Object view

    Hello Anjali,

    You can use following tag to display related records in object view

    <apex:relatedList list="Account"> <apex:facet name="header">Titles can be overriden with facets</apex:facet> </apex:relatedList>

    Thanks.

  • Avnish Yadav

    Member
    September 13, 2018 at 12:07 pm in reply to: What is the scope of static variable in Apex?

    Hello Anurag,

    Also on Async call, the static variable will not work.

    Thanks.

  • Avnish Yadav

    Member
    September 12, 2018 at 1:26 pm in reply to: Difference between 'null' and 'undefined' In Apex

    Hello,

    If you declare a variable and don't initialize it with a value, it will be null. In essence, null means the absence of a value while if you use variable and not declare it data types then it is undefined.

    Thanks.

  • Avnish Yadav

    Member
    September 12, 2018 at 9:31 am in reply to: implement quick action

    Hey Prachi,

    Use force:lightningQuickAction or force:lightningQuickActionWithoutHeader interface to implements lightning component in quick action.

    Thanks.

  • Hello,

    This is because leads are that they can easily be worked by sales development reps. On the other hand, contacts are more associated with opportunities, accounts, and revenues.

    Thanks.

Page 12 of 21