+ Start a Discussion
Subodh Kumar 42Subodh Kumar 42 
we can not call one asynchronous process to another asynchronous process but how can we call from one batch to another batch since batch is also asynchronous process?
Best Answer chosen by Subodh Kumar 42
Khan AnasKhan Anas (Salesforce Developers) 
Hi Subodh,

Greetings to you!

There's no rule that says that "asynchronous cannot call asynchronous". There are specific rules in place, such as "future cannot call future". A Queueable can call another Queueable, a Batchable can call another Batchable in the finish method, and Scheduleable methods can call Batchable and Queueable methods. There are usually lesser limits allowed for asynchronous contexts (e.g. a Queueable can call only one Queueable, while a normal synchronous transaction can call 50 of them).

Reference: https://salesforce.stackexchange.com/questions/204896/calling-async-from-async-process

To call another batch class from a batch class: 
1. Call another batch class in the finish method as execute method is called many times but Start and finish method only once.
2. So once your main batch is completed and the finish method is called and then it will call another batch.

Please refer to the below link which might help you further:


I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
rima khanrima khan 
I registered with trailhead.
I’m an SDR looking to expand my Salesforce skill set. Let’s pretend I have none. Particularly looking for the basics around reporting, and any other trails that may be beneficial to spend some time with.
My goal is to have a competent understanding of SF to build my sales as I enter a closing role and the relevant tools in SF that will help me gain an advantage.
Thanks in advance!
Best Answer chosen by rima khan
manasa udupimanasa udupi
Hi Rima,

Below are few trailhead links, hope it helps:)

meghna nmeghna n 
I have a json as follows.
[{"claimId":"M00234835","dateOfServiceBegin":"2018-12-31","legalOwnerName":"Joseph, Alice A","totalBilled":1000,"summary":"summary1","description":"descp1","dateTime":"2019-04-22T05:51:00.000Z","priority":"Low"},
{"claimId":"M00234834","dateOfServiceBegin":"2019-01-01","legalOwnerName":"Health 1st PC","totalBilled":1000,"summary":"","dateTime":"","priority":"Low"}]

I have a lightning component and in the markup I want to display the individual values of the above json.

so I am doing l like this.
<aura:attribute name="claimReworkRecords" type="Object" access="global" description="Claims Rework Data"/>

Now I am getting the entire JSON data into the above attribute I specified.

for(var i=0;i<claimsData.length;i++)
                    "claimId": claimsData[i].claimId,

Now I want to display the individual values so in markup I am doing like this
 <aura:iteration items="{!v.claimReworkRecords}" var="claim" indexVar="indx">

But its not displaying the individual values. Pleas let me know with correct code how I can achive this.

Best Answer chosen by meghna n
Ramesh DepaiahRamesh Depaiah
Hi @Meghna,
<aura:attribute name="claimReworkRecords" type="List" default="[]" />

<aura:iteration items="{!v.claimReworkRecords}" var="claim" indexVar="indx">
init:function (component, event) {
        var mystr='Your jsonscript';
        component.set("v.claimReworkRecords", JSON.parse(mystr));  
User-added image

I hope you find the above solution helpful. If it does mark as best answer to help others too.

Ramesh D

Dave ParadiseDave Paradise 
I'm currently working on Challenge 3 and am dealing with trying to fix this error:
Challenge Not yet complete... here's what's wrong: 
The report 'Open Support Cases' contains records of the incorrect status. Please check the filter.
For the Open Support Cases, I created a Custom Report Type linking Accounts and Cases and have the groupings and fields set up as specified. For the filter, I've tried "Closed equals False" and "Status not equal to Closed" for the Cases, but neither of those worked.

If anyone who has passed this challenge can provide input on what's wrong with this report. It'll be much appreciated.

Open Support Cases Report Screenshot
Best Answer chosen by Dave Paradise
Maheshkumar Selvaraj 10Maheshkumar Selvaraj 10
The Report type should be of 'Cases' and not 'Accounts And Cases'
Julie CurryJulie Curry 
I am trying to create a simple reference table that our support agents can see on the case record.  I don't need it to contain data from Salesforce only pre-defined text.  I would like it to have 2 columns and 4 rows.  It will be somewhat similar to the image I have inserted.  I'm not a developer so I was wondering if someone could provide a sample of something similar they have to help get me started.  Thanks in advance for your help!User-added image
Best Answer chosen by Julie Curry
kumud thakur 20kumud thakur 20
<table style="width:100%">
    <th>Header 1</th>
    <th>Header 2</th> 
  <tr>  <!-- Tr to create row --->
    <td>Header 1 data</td> <!-- data to the column --->
    <td>Header 2 data</td> 
    <td>Header 12</td>
    <td>Header 22</td> 
    <td>Header 13</td>
    <td>Header 23</td> 
    <td>Header 14</td>
    <td>Header 24</td> 

You can add CSS style to make better look and feel. This is very basic table to start. Hope it will help you to start.
David LorberDavid Lorber 
I'm having trouble getting started with a basic trigger.  When a product is added to a quote, I want it to pull the product description.  Any help getting started would be appreciated

my test so far looks like:

trigger AddDescription on QuoteLineItem (before insert) {
    for (QuoteLineItem qli : Trigger.New){
        qli.Description = 'Description here';
Best Answer chosen by David Lorber
Harish DHarish D
Hi David,

This requirement can be achieved by writing a workflow rule on the Quote Line Item object using a Field update. Write a Workflow rule on Quote Line Object and add a  Field Update with the values Field to Update = Line Item Description and Formula Value= Product2.Description.

User-added image
Mark this as Best answer if it resolves your issue.


Gaston LeferGaston Lefer 
Just trying to display the current user info on a lightning page
Best Answer chosen by Gaston Lefer
for this you have need to on component load call the apex method and fetch the current login user information, here is the sample

apex class controller :
public class currentUserInfoCtrl {
    public static user fetchUser(){
       User u = [select id,Name from User where id =: userInfo.getUserId()];
        return u;
lightning component :
<aura:component controller="currentUserInfoCtrl">
  <aura:handler name="init" value="this" action="{!c.doInit}"/>
  <aura:attribute name="userInfo" type="user"/>  
    Current User Name : {!v.userInfo.Name}
javaScript controller :
	doInit : function(component, event, helper) {
	var action = component.get("c.fetchUser");
        action.setCallback(this, function(response) {
            var state = response.getState();
            if (state === "SUCCESS") {
                var storeResponse = response.getReturnValue();
                component.set("v.userInfo", storeResponse);

i hope it helps you.
      Let me inform if it helps you and kindly mark it best answer if it helps you so it make proper solution for others

I've been told that I can parse the subject line of a case using flow and process builder but I really have no idea where to start. Can someone give me an outline of the steps I would take? I've done some investigating in flow but the only thing I can see that may work would be to use a loop variable but I don't know if I'm even heading in the right direction. 

Here's what I'm hoping to accomplish: 
We have cases that all come in from the same email address. The email address is not associated with any of the contacts on the accounts however they have the correct account number in the subject line of the case. I need to assign the case to the correct account based on the account number in the case subject line. All of the account numbers are six characters long. 

Here's an example of what the subject line would look like: "123456 Backups complete on "
Best Answer chosen by Andy Boettcher
I'm glad you replied because I've been meaning to come back here and post the solution. I actually got it to work. I created a headless flow and am calling that from process builder. The flow uses a fast lookup to get the case and assign it to an sobject. I'm passing in the case id in from Process Builder and assigning it to a variable. In the flow, I created a formula that parses the case subject by getting the first six characters of the subject (LEFT({!sobjCase.Subject}, 6)). Then I used assignment logic to assign that formula to a variable. Then I added another record lookup to lookup the Account ID from the variable varAccountNum. Then, I added a record update to update the account on the case.

User-added image
Spencer EdieSpencer Edie 
If I have a formula field whose formula is "= TODAY() - Account.Last_Contact_Date__c", is there a way for me to use apex/soql to access that field such that it returns the formula as a string rather than the date it would otherwise return?
Best Answer chosen by Spencer Edie
Alain CabonAlain Cabon
String selectedObject = Account.sObjectType.getDescribe().getName();

selectedObject = 'MyObject__c';


Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
Schema.SObjectType objectSchema = schemaMap.get(selectedObject);
Map<String, Schema.SObjectField> fieldMap = objectSchema.getDescribe().fields.getMap();
for (String fieldName: fieldMap.keySet()){  
    Schema.DescribeFieldResult df  =  fieldMap.get(fieldName).getDescribe();
    if (df.isCalculated() &&  df.getCalculatedFormula() != null) {
         system.debug('field name:' +  fieldName + ' label:' + df.getLabel() + 
        ' type:' +  df.getType() + ' formula:' + df.getCalculatedFormula().replace('\n',' ').replace('\r',' '));


Best Answer chosen by Rajendra Singh Nagar
Rajendra Singh NagarRajendra Singh Nagar
It got resolved by Salesforce trailhead team. Not facing any issue any more.