Forum Replies Created

Page 3 of 3
  • krati

    Member
    January 24, 2020 at 2:28 pm in reply to: What is thread sleep in Salesforce?

    A sleeping thread in a multi-tenant world, is one which cannot be used by another customer.

    • This reply was modified 4 years, 10 months ago by  krati vishnoi.
  • System.runAs(), lets the user write their test methods which change that user's context either to an existing user or a new user.

  • krati

    Member
    January 23, 2020 at 1:15 pm in reply to: In Salesforce Dashboard, how many reports can be added?

    You can add upto 20 components in Dashboard, reports (that acts as a data source for dashboard) can 1 or 20.

    Maximum you can use upto 20 reports in Dashboard.

  • krati

    Member
    January 23, 2020 at 6:37 am in reply to: difference of dml and database.dml in Salesforce?

    The main difference is the handling of bulk operations.

    In bulk DML processing , if exception is thrown whole processing is stopped. Whereas, Database.DML allows partial success.

  • krati

    Member
    January 22, 2020 at 12:07 pm in reply to: What are the Apex best practices in Salesforce ?

    Some of the best practices are:

    1: Bulkify your Code

    2: Avoid SOQL Queries or DML statements inside FOR Loops

    3: Bulkify your Helper Methods

    4: Use of the Limits Apex Methods to Avoid Hitting Governor Limits

    5: Avoiding Hard coded IDs

    For details go to:
    https://developer.salesforce.com/page/Apex_Code_Best_Practices

  • krati

    Member
    January 22, 2020 at 12:03 pm in reply to: What is the difference between WhoID and WhatID in Salesforce?

    WhoIDs refers to people things. Your ContactID and LeadIDs are whoIds.

    WhatIDs refers to object type things. These will be sObject Ids like AccountID , OpportunityIds etc.

  • krati

    Member
    January 22, 2020 at 11:55 am in reply to: Sharing files from an external system in Salesforce

    You can always use Libraries. Or you can add files in chatter group that will be accessible to community users.

    • This reply was modified 4 years, 10 months ago by  krati vishnoi.
  • Here you can make a public String variable and where you are calling your batch class store the value of the batchJob. For Example:

    public class SomeClass{
        Id batchProcessId;
    
    public void callBatchPieChartClass(){
            
            Algoworks_BatchClassPieChart batchClass = new Algoworks_BatchClassPieChart();
            batchProcessId = Database.executeBatch(batchClass);
        }
    
    // In another method you can have the value of that JobId.
    
    public void getJobID() {
            
         AsyncApexJob  asyn = [SELECT Id, Status, JobItemsProcessed, TotalJobItems, NumberOfErrors
                           FROM AsyncApexJob WHERE ID =: batchProcessId ];
    }
    }

     

  • krati

    Member
    January 21, 2020 at 5:13 pm in reply to: What is system.asserts method?

    System Class contains methods for system operations. For example System.debug.

    System.assert - it asserts whether the specified condition is true. If the condition is not met then the system throws throws a fatal error.

  • krati

    Member
    January 21, 2020 at 11:35 am in reply to: Batch class Query

    Go to Debug Logs and check the Trace Flags and check your Expiration date.

  • krati

    Member
    January 17, 2020 at 1:25 pm in reply to: What is the junction object in Salesforce and what is it used for?

    A junction object is a custom object with two master-detail relationships.

     

    Example: For example, you create a custom object called “Bug” that relates to the standard case object such that a bug could be related to multiple cases and a case could also be related to multiple bugs.

Page 3 of 3