Forum Replies Created

  • Ashutosh

    Member
    September 25, 2019 at 1:30 PM in reply to: What is the use of force:recordData in Salesforce lightning component?

    A force:recordData component defines the parameters for accessing, modifying, or creating a record using Lightning Data Service. You have granular control on how you want to display or render the data in your custom component.

    We recommend that you use the simpler lightning:recordForm component for accessing, modifying, or creating a record if you don't need a custom layout or custom rendering of record data.

    To load a record, specify its record ID, the component attributes, and a list of fields in your custom component. You can add your custom component to a record home page in the Lightning App Builder, or as a custom action.
    In the following example, the record ID is supplied by the implicit recordId attribute added by the force:hasRecordId interface. A lightning:card component is used to display the record data via accountRecord on the targetFields attribute.

    <aura:component implements="force:hasRecordId,flexipage:availableForRecordHome">
    <aura:attribute name="accountRecord" type="Object"/>
    <aura:attribute name="recordLoadError" type="String"/>

    <force:recordData aura:id="recordLoader"
    recordId="{!v.recordId}"
    fields="Name,Description,Phone,Industry"
    targetFields="{!v.accountRecord}"
    targetError="{!v.recordLoadError}"
    />

    <div>
    <lightning:card iconName="standard:account" title="{!v.accountRecord.Name}" >
    <div class="slds-p-horizontal--small">
    <p class="slds-text-heading--medium"><lightning:formattedPhone title="Phone" value="{!v.accountRecord.Phone}" /></p>
    <p class="slds-truncate"><lightning:formattedText title="Description" value="{!v.accountRecord.Description}" /></p>
    <p class="slds-truncate"> <lightning:formattedText title="Industry" value="{!v.accountRecord.Industry}" /></p>
    </div>
    </lightning:card>
    </div>
    </aura:component>

     

  • A lightning:formattedText component displays a read-only representation of text, wrapping URLs and email addresses in anchor tags (also known as "linkify"). It also converts the r or n characters into <br /> tags.

    To display URLs and email addresses in a block of text in anchor tags, set linkify="true". If not set, URLs and email addresses display as plain text. Setting linkify="true" wraps URLs and email addresses in anchor tags with target="_blank". URLs and email addresses are appended by http:// and mailto:// respectively.

    For Example:
    <aura:component>
    <lightning:formattedText linkify="true" value="I like salesforce.com and trailhead.salesforce.com." />
    </aura:component>

  • Ashutosh

    Member
    September 25, 2019 at 1:23 PM in reply to: What is the Limit of no of callouts in Apex class and Apex Batch?

    These are the governor Limits you need to keep in mind when dealing with Batch Apex

    1.Up to five queued or active batch jobs are allowed for Apex.
    2.Using Database.QueryLocator batch apex returns 50 million records if more than 50 million records are returned.
    3.The batch apex Database.execute method can have batches of a maximum number of 2,000, minimum 1 and by default 200 batches.
    4.Salesforce chunks the records returned by the start method and then passes each batch to the execute method where governor limits are reset for each execution of execute.
    5.The batch apex can implement up to 10 callouts per each batch methods.
    6.250,000 is the maximum number of batch executions per 24 hours.
    7.Only one batch Apex job's start method can run at a time in an organization. The batch jobs which haven’t started yet remain in the queue until they are started.

  • Ashutosh

    Member
    September 13, 2019 at 8:28 PM in reply to: Is it possible to remove the legend on a chart in Salesforce?

    This is not possible in standard salesforce chart and dashboard . But if you creating custom chart using some external library (for ex chart js) then it is possible

  • you could try something like this:

    IF(INCLUDES( Multi_Picklist_1__c , "A"), "A", NULL)  + BR() +
    IF(INCLUDES( Multi_Picklist_1__c , "B"), "B", NULL)  + BR() +
    IF(INCLUDES( Multi_Picklist_1__c , "C"), "C", NULL)

  • Ashutosh

    Member
    September 13, 2019 at 12:04 PM in reply to: Explain Salesforce Apex Email Service?

    You can use email services to process the contents, headers, and attachments of inbound email. For example, you can create an email service that automatically creates contact records based on contact information in messages.

    Note

    Visualforce email templates cannot be used for mass email.
    You can associate each email service with one or more Salesforce-generated email addresses to which users can send messages for processing. To give multiple users access to a single email service, you can:

    Associate multiple Salesforce-generated email addresses with the email service and allocate those addresses to users.
    Associate a single Salesforce-generated email address with the email service, and write an Apex class that executes according to the user accessing the email service. For example, you can write an Apex class that identifies the user based on the user's email address and creates records on behalf of that user.

    To use email services, from Setup, enter Email Services in the Quick Find box, then select Email Services.

    1.Click New Email Service to define a new email service.
    2.Select an existing email service to view its configuration, activate or deactivate it, and view or specify addresses for that email service.
    3.Click Edit to make changes to an existing email service.
    4.Click Delete to delete an email service.
    Note

    Before deleting email services, you must delete all associated email service addresses.

    When defining email services, note the following:

    1.An email service only processes messages it receives at one of its addresses.
    2.Salesforce limits the total number of messages that all email services combined, including On-Demand Email-to-Case, can process daily. Messages that exceed this limit are bounced, discarded, or queued for processing the next day, depending on how you configure the failure response settings for each email service. Salesforce calculates the limit by multiplying the number of user licenses by 1,000; maximum 1,000,000. For example, if you have 10 licenses, your org can process up to 10,000 email messages a day.
    3.Email service addresses that you create in your sandbox cannot be copied to your production org.
    4.For each email service, you can tell Salesforce to send error email messages to a specified address instead of the sender's email address.
    5.Email services reject email messages and notify the sender if the email (combined body text, body HTML, and attachments) exceeds approximately 10 MB (varies depending on language and character set).

  • Ashutosh

    Member
    September 13, 2019 at 11:22 AM in reply to: How to schedule the Schedule Apex ?Wer it will store???

    you can schedule the schedule apex by

    RemindOpptyOwners reminder = new RemindOpptyOwners();
    // Seconds Minutes Hours Day_of_month Month Day_of_week optional_year
    String sch = '20 30 8 10 2 ?';
    String jobID = System.schedule('Remind Opp Owners', sch, reminder);

    Or You can schedule it directly by clicking on schedule apex

  • Ashutosh

    Member
    September 13, 2019 at 11:16 AM in reply to: How to call batch from Trigger?is that possible

    Yes you can call batch form trigger

    testbatchclass b = New testbatchclass();

    Database.executeBatch(b);

  • Ashutosh

    Member
    September 13, 2019 at 11:08 AM in reply to: What is the difference between empty and null in Salesforce?

    ISBLANK() should be used instead of the legacy ISNULL(). The biggest difference having to do with text fields.

    Use ISBLANK instead of ISNULL in new formulas. ISBLANK has the same functionality as ISNULL, but also supports text fields. Salesforce will continue to support ISNULL, so you do not need to change any existing formulas.
    This is further explained by,

    Text fields are never null, so using ISNULL() with a text field always returns false. For example, the formula field IF(ISNULL(new__c) 1, 0) is always zero regardless of the value in the New field. For text fields, use the ISBLANK function instead.

  • Ashutosh

    Member
    September 13, 2019 at 10:56 AM in reply to: What is the use of Escalation Rules in Salesforce?

    Escalation rules are used to escalate cases automatically when they meet the criteria which are defined in rule . We can create rule entries where criteria is defined to escalate a case.
    Whenever an escalation rule is applied for a case,

    If the case matches with the criteria
    then the further escalation action is carried out.

    You can setup Escalation Rules from
    Click on Setup --> Admin --> Build --> Customize --> Cases --> Escalation Rules

  • Ashutosh

    Member
    September 13, 2019 at 10:49 AM in reply to: What is Email services heap size in salesforce?

    Hi,

    Email services heap size is 36 MB

  • Ashutosh

    Member
    September 13, 2019 at 10:42 AM in reply to: What is Blob in Apex in salesforce ?

    Hi,

     

    The Blob is a collection of Binary data which is stored as object. This will be used when we want to store the attachment in salesforce into a variable. This data type converts the attachments into a single object. If the blob is to be converted into a string, then we can make use of the toString and the valueOf methods for the same

    Blob Class
    Contains methods for the Blob primitive data type
    Blob Methods
    1.size()
    Returns the number of characters in the Blob.
    2.toPdf(stringToConvert)
    Creates a binary object out of the given string, encoding it as a PDF file.
    3.toString()
    Casts the Blob into a String.
    4.valueOf(stringToBlob)
    Casts the specified String to a Blob.