• sheila srivatsav
  • NEWBIE
  • 219 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 4
    Likes Received
  • 0
    Likes Given
  • 35
    Questions
  • 17
    Replies
I have a piece of code in my lightning component as follows

pCodeShortDesc = pCodeShortDesc.subtring(0,28);

this return a string like "Nebuent    Inh 300 mg"

I want to remove the two extra white spaces in the above.

Please let me know urgent how to do.

thanks
sheila
A lightning component makes an api call to an external service and the result is an json response

I have given the json response as follows.
 
{"readClaimResponse": {

   "status":    {

      "statusCode": "0",

      "detail": "SUCCESS"
   },

   "claim":    {

      "claimIdentifier":       {

         "idSource": "63",

         "idValue": "183245438591000",

         "idType": "pharmacyclaims"

      },

      "claimType": "Pharmacy",  

      "billedAmount": "520",

      "allowedAmount": "500.4",

      "planPaidAmount": "400.32",

      "totalMemberResponsibility": "100.08",

      "paidToProvider": "400.32",

      "deductible": "0.00",

      "claimProcessedDate": "2018-11-20T20:51:37.001100",

      "claimStatus": "Final",

      "dateOfServiceBegin": "2018-10-15",

      "dateOfServiceEnd": "2018-10-15",

      "providerName": "CVS PHARMACY 16890",

      "amountCoinsurance": "100.08",

      "amountCopay": "0.00",

      "healthClaimLines": [      {

         "amountCopay": "0.00",

         "amountCoinsurance": "100.08",

         "billedAmount": "520",

         "allowedAmount": "500.4",

         "deductible": "0.00",

         "paidAmount": "400.32",

         "memberResponsibility": "100.08",

         "procedureCode": [         {

            "procedureCode": "63323087715",

            "procedureCodeDescr": "Nebupent     Inh 300mg"

         }],

         "healthClaimLineIdentifier":          {

            "idSource": "100",

            "idValue": "FDGP2KT5800+001",

            "idType": "Healthclaimline"

         },

         "dateOfServiceBegin": "2018-10-15",

         "dateOfServiceEnd": "2018-10-15",

         "unitsOfService": "30.000"

      }]

   }

}}
what I am not understanding is how to get the "claimType" value into an aura:attribute for further processing.
I need the value of "claimType" i.e Pharmacy into an aura:attribute for further processing.
Please let me know how to achieve this at the very earliest.
Like I do not have much exp in json

thanks
sheila
I am tring to get my basics clear while making an api call from lightning application.

But when I debug the statement  var action=resposne.getState(), the state is ERROR
 
public class httpCalloutController {

    @AuraEnabled
    public static void getCalloutResponseContents()
    {
        Http h = new Http();
      
        HttpRequest req = new HttpRequest();
		req.setEndpoint('https://th-apex-http-callout.herokuapp.com/animals');
		req.setMethod('GET');      
        
        // Send the request, and return a response
		HttpResponse res = h.send(req);
		System.debug('response:--> ' + res.getBody());
        
        
        string jsonstring=(string)JSON.deserializeUntyped(res.getBody());
        system.debug('jsonstring-->' + jsonstring);
     }
}

CalloutComponent.cmp

<aura:component implements="flexipage:availableForAllPageTypes" 
                access="global"
                controller="httpCalloutController">
    
    <aura:attribute name="response" type="string"/>
    
	<aura:attribute name="jsonoutput" type="String[]"/>
    
    <lightning:button label="Make Callout" 
                      title="Make Callout"
                      onclick="{!c.MakeCallOut}"/>

    {!jsonoutput}
    
</aura:component>

CalloutComponentController.js

({
	MakeCallOut : function(component, event, helper) {
		
        debugger;
        var action=component.get('c.getCalloutResponseContents');
        
      // action.setParams({
        //    "URL":'https://th-apex-http-callout.herokuapp.com/animals'
        //});
        
        
        action.setCallback(this, function(response) {
            var state = response.getState();
            
          console.log('state ='+state);
            if (component.isValid() && state === "SUCCESS") {
               component.set("v.response", response.getReturnValue());
                console.log('v.response='+v.response);
             }
        });
 
        $A.enqueueAction(action);
    },
})

thanks
sheila​​​​​​​
I have a custom button defined in the page layout of account
when I click this button, enter the account number then it should save back to object
public with sharing class InitiateApprovalController {

    public Account acc{get;set;}
    
    public string accid;
    
    public InitiateApprovalController(ApexPages.StandardController stdcontroller) {

    accid=ApexPages.CurrentPage().getParameters().get('id');
    this.acc=(Account)stdcontroller.getRecord();
    
    acc=[select ID,Name,AccountNumber from Account where ID =:acc.ID];
       
    }
    
    public InitiateApprovalController()
    {
       acc=new Account();
         
    }

    public PageReference customsave()
    {
        try{
        system.debug('acc before update ='+acc);
            
        database.Upsert(acc);
        PageReference pr=new PageReference('/'+acc.Id);

        return pr;
        }
        catch( Exception e ){
            ApexPages.addMessages(e);
            return Null;
        }       
    }
    
}

<apex:page standardController="Account"
            extensions="InitiateApprovalController">
  
  <apex:form >
  
  <apex:pageBlock mode="edit">
            <apex:pageBlockSection title="Approvers" 
                                   id="ApproversId">
                                   
             <apex:inputField Id="name" 
                              html-placeholder="Account Name.." 
                              value="{!Account.Name}" />

             <apex:inputField Id="accnumber" 
                              html-placeholder="Account Number.." 
                              value="{!Account.AccountNumber}" />
                                 
            </apex:pageBlockSection>
            
    <apex:pageBlockButtons location="bottom" html-align="right">
    
    <apex:commandButton id="customsave1"
                        value="save"
                        action="{!customsave}"/>
                        
    </apex:pageBlockButtons>
    
     </apex:pageBlock>
  </apex:form>
    
</apex:page>
I am surprised because I am using Database.Upsert but still it is not saving to object

Can any one please let me know?

Thanks
sheila
 
I am using google crome browser and performing inline editing on lightning datatable.

I am able to display the field values but when I edit Opportunity Name and click save its not saving.

Please let me know the issue.
 
public class DataTableController {

    @AuraEnabled
    public static List<Opportunity> getOpportunities()
    {
        List<Opportunity> oppList=new List<Opportunity>();
        
        oppList=[select Name,Account.Name,StageName,CloseDate,Amount from Opportunity
                 where Amount != NULL];
        
        return oppList;
    }
    
    @AuraEnabled
    public static void updateOpportunities(List<Opportunity> oppsList){
        try
        {
            Database.update(oppsList);
            
          }
        catch(Exception ex)
        {
            system.debug(ex.getMessage());
        }
    }
}

<aura:component implements="force:appHostable,force:hasRecordId,flexipage:availableForAllPageTypes" 
                controller="DataTableController"
                access="global">
	
        <!-- Three important parts of datatable is Key , data and columns
         so we need attribute for data and columns(metatadata)-->
    <!-- attributes -->
    <aura:attribute name="data" 
                    type="Object"/>
    
    <aura:attribute name="columns" 
                    type="List"/>
    
<aura:attribute name="updatedRecord" type="Object[]" />

    <!-- handlers-->
    <aura:handler name="init" 
                  value="{!this}" 
                  action="{!c.doInit}"/>
    
    <lightning:card title="OpportunityDatatable">
        
        <lightning:datatable aura:id="opportunitydatatable"
                             keyField="id"
                             data="{!v.data}"
                             columns="{!v.columns}"
                             onsave="{!c.handleSaveOpps}"
                             hideCheckboxColumn="true"/>
        
</lightning:card>
    
    {!updatedRecord}

</aura:component>

({
	doInit : function(component, event, helper) {
        
        helper.queryColumns(component,event,helper);
        
        helper.queryContacts(component,event,helper);
  	},
    
    handleSaveOpps: function (component, event, helper) {
        debugger;    
        var draftValues = event.getParam('draftValues');
console.log(draftValues);
        var action = component.get('c.updateOpportunities');
        action.setParams({ 
            "oppsList": draftValues
        });
        action.setCallback(this, $A.getCallback(function(response) {
            var state = response.getState();
            if (state === "SUCCESS") {
                helper.fireSuccessToast(component);  
                helper.fireRefreshEvt(component);
            } else if (state === "ERROR") {
                var errors = response.getError();
                console.error(errors);
                helper.fireFailureToast(component);  
            }
        }));
        $A.enqueueAction(action);
    }
     
})


({
	queryColumns : function(component,event,helper) {
        
		  component.set('v.columns', [
            {label: 'Opp Name', fieldName: 'Name', editable : 'true', type: 'text'},
            {label: 'Acc Name', fieldName: 'AccountName', type: 'text'},
            {label: 'StageName', fieldName: 'StageName', type: 'text'},
            {label: 'CloseDate', fieldName: 'CloseDate', type: 'date'},
            {label: 'Amount', fieldName: 'Amount', type: 'currency', cellAttributes: { alignment: 'left' }} 
        ]);
	},
    
    queryContacts : function(component,event,helper) {
        
        var action=component.get('c.getOpportunities');
        
        action.setParams({
        });
        action.setCallback(this, function(response){
            var state = response.getState();
            if (state === "SUCCESS") {
                
                  //the following code will display the parent account name
                 var rows = response.getReturnValue();
                 for (var i = 0; i < rows.length; i++) {
                    var row = rows[i];
                    if (row.Account) row.AccountName = row.Account.Name;
                }
                //component.set("v.data", response.getReturnValue());
                 component.set("v.data", rows);
            }
        });
        $A.enqueueAction(action);
    },
    
     fireSuccessToast : function(component) {
        var toastEvent = $A.get("e.force:showToast");
        toastEvent.setParams({ 
            'title' : 'Success', 
            'message' : 'Opportunities updated sucessfully.' ,
            'type':'success'
        }); 
        toastEvent.fire(); 
    },
    
    fireFailureToast : function(component) {
        var toastEvent = $A.get("e.force:showToast");
        toastEvent.setParams({ 
            'title' : 'Failed', 
            'message' : 'An error occurred. Please contact your administrator.',
            'type':'error'
        }); 
        toastEvent.fire(); 
    },
    
    fireRefreshEvt : function(component) {
        var refreshEvent = $A.get("e.force:refreshView");
        if(refreshEvent){
            refreshEvent.fire();
        }
    }
       
})

 
I just started working on lightning datatable.

The code is working but StageName , closedate and amount values are not displayed.
 
public class DataTableController {

    @AuraEnabled
    public static List<Opportunity> getOpportunities()
    {
        List<Opportunity> oppList=new List<Opportunity>();
        
        oppList=[select name,Account.Name,StageName,CloseDate,Amount from Opportunity
                       where StageName != NULL
                       AND
                       Amount != NULL
                       order by Account.Name];
        
        return oppList;
    }
}

<aura:component implements="force:appHostable,force:hasRecordId,flexipage:availableForAllPageTypes" 
                controller="DataTableController"
                access="global">
	
        <!-- Three important parts of datatable is Key , data and columns
         so we need attribute for data and columns(metatadata)-->
    <!-- attributes -->
    <aura:attribute name="data" 
                    type="Object"/>
    
    <aura:attribute name="columns" 
                    type="List[]"/>
    

    <!-- handlers-->
    <aura:handler name="init" 
                  value="{!this}" 
                  action="{!c.doInit}"/>
    
    <!-- the container element determine the height of the datatable -->
    <div style="height: 300px">
        
        <lightning:datatable aura:id="opportunitydatatable"
                             
                             keyField="id"
                             data="{!v.data}"
                             columns="{!v.columns}"
                             hideCheckboxColumn="true"/>
        
    </div>
</aura:component>

({
	doInit : function(component, event, helper) {
        
        helper.queryColumns(component,event,helper);
        
        helper.queryContacts(component,event,helper);
  	}
})

({
	queryColumns : function(component,event,helper) {
        
		  component.set('v.columns', [
            {label: 'Opp Name', fieldName: 'Name', type: 'text'},
            {label: 'Acc Name', fieldName: 'Name', type: 'text'},
            {label: 'StageName', fieldName: 'Stage Name', type: 'text'},
            {label: 'CloseDate', fieldName: 'CloseDate', type: 'text'},
            {label: 'Amount', fieldName: 'Amount', type: 'decimal'}  
        ]);
	},
    
    queryContacts : function(component,event,helper) {
        
        var action=component.get('c.getOpportunities');
        
        action.setParams({
        });
        action.setCallback(this, function(response){
            var state = response.getState();
            if (state === "SUCCESS") {
                component.set("v.data", response.getReturnValue());
                
            }
        });
        $A.enqueueAction(action);
    }
       
})
I need to know two things
a. what is the issue I am facing and how to resolve it
b. How many columns in total can we display in datatable

sheila
 
I am tring to get the basic right for working on force:recorddata
I want to load the record when I click any opportunity record in lightning but no record values are showing up.
<aura:component implements="flexipage:availableForAllPageTypes,
                            force:lightningQuickAction,
                            force:hasRecordId"
                             access="global">
	
    <!--define the object ion which u want to perform the operations-->
    <aura:attribute name="oppor"
                    type="Opportunity"/>

     <aura:attribute name="recordId" type="String"/>

    <aura:attribute name="recordError" 
                    type="String" 
	                description="An error message bound to force:recordData"/>
        
    <aura:attribute name="opporRecord" 
                    type="Opportunity" 
	                description="A simplified view record object to be displayed"/>

       

    <force:recordData aura:id="forceRecordCmp"
                      recordId="{!v.recordId}"
                      targetRecord="{!v.oppor}"
                      targetFields="{!v.opporRecord}"
                      targetError="{!v.recordError}" 
                      recordUpdated="{!c.handleRecordUpdated}"
                      fields="ID,Name,StageName,Amount"/>
    
    <div class="slds-box">
    <div class="slds-text-heading_medium">
            Load Opportunity - Data Service
        </div>
        
          <div class="slds-form--stacked slds-tile">
            <div class="slds-form-element">
                <label class="slds-form-element__label"  >Name: </label>
                <div class="slds-form-element__control">
                  <ui:outputText class="slds-input" 
                    value="{!v.opporRecord.Name}" />
                </div>
            </div> 
            <div class="slds-form-element">
                <label class="slds-form-element__label" >Stage name : </label>
                <div class="slds-form-element__control">
                  <ui:outputTextArea class="slds-input"  
                    value="{!v.opporRecord.StageName}"  />
                </div>
            </div> 
              
               <div class="slds-form-element">
                <label class="slds-form-element__label" >Amount : </label>
                <div class="slds-form-element__control">
                  <ui:outputTextArea class="slds-input"  
                    value="{!v.opporRecord.Amount}"  />
                </div>
            </div> 
              
              
        </div> 
    </div>
</aura:component>

I created a new action and added the button to the page layout of opportunity object.
Now when I click any opportuntity record then I just a poup appears but I don't see any values of the selected record.

please correct me if I am doing wrong.

thanks
sheila
 
I am displaying a list of account record with a checkbox
so when the user checks a record then I need the ID of that selected record in controller for further processing.

I am using actionsupport for this but I am unable to get the ID of the selected record in controller.

Please let me know where I am going wrong and if there is a better way of doing this.
 
public class ActionSupportParamDemoController
{

    public Id targetAccountId;
    
    public Id selectedAccountId { get; set; }
    
    public ActionSupportParamDemoController(ApexPages.StandardController controller) {

    }

  public List<Account> getAccounts()
  {
    return [select ID,Name,Active__c
            from Account
            order By name
            LIMIT 10];
  }

  public PageReference handleCheckBoxChange()
  {
      system.debug('target accountid ='+targetAccountId);
      
      selectedAccountId = targetAccountId;
      
       system.debug('target accountid ='+targetAccountId);
       system.debug('selected account ID ='+selectedAccountId);
      return null;
         
  }
  
  //own method
  public Id getTargetAccountId() {
        return targetAccountId;
    }
  
  public void setTargetAccountId(Id value) {
        targetAccountId = value;
    }
}

visualforce page
<apex:page standardController="Account"
           extensions="ActionSupportParamDemoController">
         
<apex:form>

 <apex:repeat value="{!Accounts}"
                var="accn">
                
       <apex:inputCheckbox value="{!accn.Active__c}">
       <br/>
       <apex:actionSupport event="onchange"
                           action="{!handleCheckBoxChange}">
                           
                    <apex:param id="account" 
                                name="accnId" 
                                value="{!accn.ID}"
                                assignTo="{!targetAccountId}"/>
                            
       </apex:actionSupport>
       
       </apex:inputCheckbox>
       {!accn.Name}
                 
 </apex:repeat>
 {!selectedAccountId}
</apex:form>


</apex:page>

thanks
sheila
 
Hi
I am testing my visualforce & apex coding skills .
I have implemented a extension class with standard controller to mimic the functionality of SAVE , SAVE&NEW and QUICKSAVE.
public with sharing class MimicSaveQuickSave {

    ApexPages.StandardController sController;
    
    public MimicSaveQuickSave(ApexPages.StandardController stdcontroller) {

         sController=stdcontroller;
         
    }

    public PageReference saveAndNew()
   {
   
      sController.save();
      PageReference pref=new PageReference('/003/o');
      pref.setRedirect(true);
      
      return pref;
   }
 }
<apex:page standardController="Contact" extensions="MimicSaveQuickSave">
  <apex:form >
  
    <apex:pageBlock title="My Content" mode="edit">
    
      <apex:pageBlockButtons >
      
        <apex:commandButton action="{!save}" 
                            value="Save"/>
                            
      <apex:commandButton action="{!QuickSave}" 
                            value="QuickSave"/> 

       <apex:commandButton action="{!saveAndNew}" 
                            value="SaveAndNew"/>
                            
       <apex:commandButton action="{!cancel}" 
                            value="cancel"/>

      </apex:pageBlockButtons>
      
      <apex:pageBlockSection title="My Content Section" columns="2">
        <apex:inputField value="{!contact.firstname}"/>
        <apex:inputField value="{!contact.lastname}"/>
       </apex:pageBlockSection>
    </apex:pageBlock>
  </apex:form>
</apex:page>
The SAVE &  SAVE&NEW is working but I am unable to code for QUICKSAVE
a) when I click SAVE&NEW button is it possible to redirect to the same visualforce page, so the enduser can enter the input values again.
b) how to implement QUICKSAVE functionality

Pls help me out

Thanks
sheila

 
I have a parent visualforce page which has 4 fields  approver_1 , approver_2 , approver_3 and approver_4 which is lookup to user.

I have added a custom button called "InitiateApprovalProcess" in the standard layout of the page
When I click this button it opens as a popup(visualforce page), I have shown the code below where I will enter the field values.
This popup (visualforce page) has save and cancel buttons.

When I click save button it saves the values to the parent, I mean the parent page should get refreshed with the values from the popup.

vf page:
=======
<apex:page standardController="MedConnect__FDA_3500A_MedWatch_Report__c" extensions="VY_InitiateApprovalProcess_Controller" lightningStylesheets="true">
<apex:includeScript value="{!$Resource.MedConnect__jquery}" />
    <apex:includeScript value="{!URLFOR($Resource.MedConnect__jquery_ui,'jquery-ui-1.10.3/ui/minified/jquery-ui.min.js')}"/>
    <apex:stylesheet value="{!URLFOR($Resource.MedConnect__jquery_ui,'jquery-ui-1.10.3/themes/base/jquery-ui.css')}"/>
<apex:form >
<apex:pageBlock mode="edit">
<apex:pageBlockSection title="Approvers" id="ApproversId">
    <apex:inputField Id="appId1" html-placeholder="Search People..." value="{!Approver.VY_Approver1__c}" />
    <apex:inputField Id="appId2" html-placeholder="Search People..." value="{!Approver.VY_Approver2__c}" />
    </apex:pageBlockSection>
    <apex:pageBlockSection >
    <apex:inputField Id="appId3" html-placeholder="Search People..." value="{!Approver.VY_Approver3__c}" />
    <apex:inputField Id="appId4" html-placeholder="Search People..." value="{!Approver.VY_Approver4__c}" />
    </apex:pageBlockSection>
    <apex:pageBlockButtons location="bottom" html-align="right">
    <button class="btn" onclick="window.open('/{!$CurrentPage.parameters.id}', target='_self');return false;">Cancel</button>
     <apex:commandButton action="{!customSave}" value="Save" onClick="Window.Close()" onomplete="window.top.location.reload()"/>
     
    </apex:pageBlockButtons>
    </apex:pageBlock>
</apex:form>
    <script language="JavaScript" type="text/javascript">
function CloseAndRefresh(){
window.opener.location.href="/{!$CurrentPage.parameters.ID}";
      self.close();
  }
</script>
</apex:page>

apex controller of poup page
======================
public with sharing class VY_InitiateApprovalProcess_Controller
{
    public id ReportIds;
    public MedConnect__FDA_3500A_MedWatch_Report__c Approver { get; set; }
   
    public VY_InitiateApprovalProcess_Controller(ApexPages.StandardController controller) {
        ReportIds = ApexPages.CurrentPage().getParameters().get('id');
        this.Approver = (MedConnect__FDA_3500A_MedWatch_Report__c)controller.getRecord();
        Approver =[SELECT Id,VY_Approver1__c,VY_Approver2__c,VY_Approver3__c,VY_Approver4__c
                            FROM
                            MedConnect__FDA_3500A_MedWatch_Report__c WHERE Id =:ReportIds];
    }
    public VY_InitiateApprovalProcess_Controller()
    {
        Approver = new MedConnect__FDA_3500A_MedWatch_Report__c();
    }
   
    public PageReference customSave()
    {
        PageReference pr;
        try{
            database.upsert(Approver);
            //closeWindow = true;
            pr = new PageReference('/'+Approver.Id );
        }catch( Exception e ){
            ApexPages.addMessages(e);
        }
        return Null;       
    }}

I require 2 functionalities as follows

a) when user click save the popup page should close and the parent page should be refreshed with the updated field values.

b) when I click cancel button the page should close.

Please help me out with this functionality with working code, I am not very good in javascript.

Thanks
sheila


c)
 
I have a custom setting called BindValues__c which has a single field say value__c
It contains values as : A1  1   , A2  2   , A3  3  ,  A4  4 , A5  5 , A6  6 , A7 7 , A8  8 , A9  9 , A10  10 , A11  11

I have worked on a code which binds the values into a picklist as shown below , also I attached a screen shot to show my requirement.

custom setting
values

data
public class CodeGeneratorController {
    public List<SelectOption> Values { get; set; }
    
    public CodeGeneratorController() {
        getValues();
    }
    
    public void getValues() {
        Values = new List<SelectOption>();
        
        List<BindVaues__c> allValues = new List<BindVaues__c>();

        allValues=[SELECT  Name FROM BindVaues__c];
        
        for( BindVaues__c val : allValues) {
          Values.add( new SelectOption( val.Id, val.Name) );
        }
    }
}
<apex:page controller="CodeGeneratorController">
    <apex:form >
        <apex:pageBlock >
            <apex:pageBlockSection >
                <apex:outputLabel value="Values :"/>
                  
                <apex:selectList size="1">
                    <apex:selectOptions value="{!Values}"/>
                </apex:selectList>
             </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>
My requirement is I need to access values from 1 to 5 , then do some processing , then values from 6 to 11 then do some other logic.

so I need to split the custom setting values into 2 parts i. 1 to  5 and   6  to 11.
I hope I am clear.
Please let me know how I can proceed further.

Thanks
sheila
 
My understanding of application event is if two components not related to each then we can use applicaiton event to pass data.

Please correct me if wrong.

I have done a code but I am unable to pass data.
ApplicationEvent.vt

<aura:event type="APPLICATION" description="Event template">

<aura:attribute name="message"
                type="string"
                access="public"/>
    
</aura:event>


ParentComponent.cmp

<aura:component implements="flexipage:availableForAllPageTypes" access="global" >
	
    <aura:attribute name="someattr"
                    type="string"
                    default="I am GOD"
                    access="private"/>
    
    <aura:registerEvent name="handleApplicationEvent"
                        type="c.ApplicationEvent"/>
    
    <lightning:button name="clickMe"
                      label="ClickMe"
                      onclick="{!c.HandleApplicationEvent}"/>
    
    
</aura:component>


PrentComponentController.js

({
	HandleApplicationEvent : function(component, event, helper) {
		
        debugger;
        var applnEvent=$A.get("e.c:ApplicationEvent");
        
        
        var val=component.get("v.someattr");
        console.log(val);
        
        applnEvent.setParams({"message" : val});
        
        applnEvent.fire();
     }
})


ChildComponent.cmp

<aura:component >
	
    <aura:attribute name="receivedvaluefromparent"
                    type="string"
                    access="private"/>
    
    <aura:handler event="c:ApplicationEvent"
                  action="{!c.HandleApplicationEvent}"/>
    
    <c:ParentComponent/>
    Inside the child component : {!v.receivedvaluefromparent}
    
</aura:component>


ChildComponent.js

({
	HandelApplicationEvent : function(component, event, helper) {
		
        debugger;
        var evtMessage=event.getParam("message");
        
        console.log(evtMessage);
        component.set("v.receivedvaluefromparent",evtMessage.ToString());
        
	}
})


MainApp.app

<aura:application >
    <c:ParentComponent/>
</aura:application>

I checked using debugger but value is not comoing into the child attribute from the parent.

Please let me know where I go wrong.

thanks
sheila S
 
I am working on @Future methods and quueueable apex.

we can monitor queueable job from apex jobs, get JOB ID and check the status of queueable apex job using the object AsynApexJob from workbench.

a] My question is can we do all of the above for a method marked with @future?

b] can we use database.stateful with queueable apex?

c] can we schedule a queueable job by specifying a cron string ?

c]  what is flexipage queue and how does it work..

Please elaborate in details and I request forum memebers to be specific.

thanks
sheila