• ALL STAR
  • 20137 Points
  • Member since 

  • Chatter
    Feed
  • 608
    Best Answers
  • 0
    Likes Received
  • 12
    Likes Given
  • 0
    Questions
  • 2603
    Replies
managed package expiration date missing why; I am looking for the expiration date of package, Salesforce Communities Management (for Communities with Chatter. I found it a free package, does this mean that it will never expire...I wanted to track if it is active in the organization too.. check the below mentioned article, but it did not help:

https://help.salesforce.com/articleView?id=distribution_package_detail.htm&type=5
I am trying to create a custom URL button , through which i want to set field value.. is there any way to do it?
 
I am somehow new to developing and currently working on Apex Integration Services module in Trailhead am on the third unit (Apex SOAP Callouts). I happen to have issues in downloading and saving a WSDL file to my PC. When I click the provided link on Trailhead it redirects me to a webpage that has a code without any button to download and save the file in my PC. I will appreciate if I can get any assist to work around this.The page I get that does have dowloading instructions.
Hi,
my custom object has a lookup with USer object-- createdBY
i am trying to fetch the data from custom object as
createdby.name but the field is not fetching, please help with this.
Thanks
Someone can tell me why im getting this error? Its seems a good code for me.

public class AccountHandler {
    public static Account insertNewAccount (String Nome){
        try
        {
               Account acct = new Account();
            acct.Name = Nome;
            insert acct;
            return acct;
        } catch (DmlException e){
            System.debug('A DML exception has ocurred: '+ e.getMessage());
            return null;
        }
    }
}
In my Requirement, Parent Object  is  Contact and child Object is Hippa__c.  Here i need to get the Parent Id when ever i am creating a new records from Releated list of Contact. 
If any Know Plz help me....
Hi All,

I wrote to code to trigger to calculate the total opportunity amount on Account but the trigger is not working for After Insert event. It throwing the below error. 

"AfterDelete caused by: System.NullPointerException: Attempt to de-reference a null object:"

Here is my trigger:

trigger Opportunity_AIUD on Opportunity (after insert, after update, after delete) {
    Map<Id, List<Opportunity>> acctIdOpptyListMap = new Map<Id, List<Opportunity>>();
    Map<Id, Opportunity> OldList = new Map<Id, Opportunity>();
    Set<Id> acctIds = new Set<Id>();
    List<Opportunity> opptyList = new List<Opportunity>();
    if(trigger.isUpdate || trigger.isInsert){
        for(Opportunity oppty : trigger.New){
            if(oppty.AccountId != null){
                acctIds.add(oppty.AccountId);
            }
        }    
    }
    
    If(trigger.isafter){
    if(trigger.isDelete){
        for(Opportunity oppty : trigger.old){
            if(oppty.AccountId != null){
                acctIds.add(oppty.AccountId);
                system.debug('*******acctIds*******'+acctIds);
             
            }
        }    
    }
  }
    
   
        System.debug('*****acctIdOpptyListMap ***'+acctIdOpptyListMap);
        System.debug('*********acctIds.size()***'+acctIds.size());
  
        if (acctIds.Size()>0){
        opptyList = [SELECT ID,Amount,AccountId FROM Opportunity WHERE AccountId IN : acctIds];
        System.debug('*****opptyList'+opptyList);
        for(Opportunity oppty : opptyList){
            if(!acctIdOpptyListMap.containsKey(oppty.AccountId)){
                acctIdOpptyListMap.put(oppty.AccountId, new List<Opportunity>());
                System.debug('acctIdOpptyListMap1'+ acctIdOpptyListMap);
            }
            acctIdOpptyListMap.get(oppty.AccountId).add(oppty); 
            System.debug('acctIdOpptyListMap2'+ acctIdOpptyListMap);
        } 
        
        List<Account> acctList = new List<Account>();
        acctList = [SELECT Total_Opportunity_Amount__c FROM Account WHERE Id IN: acctIds];
        System.debug('*******acctList' + acctList);
        if (acctList.size()>0){
        for(Account acct : acctList){
            List<Opportunity> tempOpptyList = new List<Opportunity>();
            tempOpptyList = acctIdOpptyListMap.get(acct.Id);
            System.debug('******** tempOpptyList' +tempOpptyList);
            Double totalOpptyAmount = 0;
            for(Opportunity oppty : tempOpptyList){
                if(oppty.Amount != null){
                    totalOpptyAmount += oppty.Amount;
                    System.debug('********totalOpptyAmount' +totalOpptyAmount);
                }
            }
            acct.Total_Opportunity_Amount__c = totalOpptyAmount;
        }
      }
        if (acctList.size()>0){
        update acctList;
        }
    }

}

I will appreciate any help. Thanks.
Im learning the usefulness of LDS.but having a problem to understand the work of  targetRecord in recordData. can we use targetRecord attribute as {!V.targetRecord} ?
I read the documentations, but still not clear with it
I need guidance in creating an app, installing an app or something that allows for a scrolling news feed relating to the account.
User-added image
While clicking on button called Visualforce page.
Hi,

I am trying to solve a  trail challeng on Visualforce standard list controller (Visualforce standard list controller trail (https://trailhead.salesforce.com/content/learn/modules/visualforce_fundamentals/visualforce_standard_list_controllers)). I have written the following code for the same:
 
<apex:page standardController="Account" recordSetVar="accounts"> 
<apex:pageBlock> 
<apex:repeat value="{! accounts }" var="a"> 
 <li><apex:outputLink value="{! a.id}"></apex:outputLink> </li> 
</apex:repeat> 
</apex:pageBlock> 
</apex:page>


Here while checking, I am getting following error:
 
The page does not bind to the record ID value (in order to link to the record detail page)
Create 3 custom Objects
a --> b -->c
c is grand child
a is grand parent
display the count of c in grandparent A
using trigger
in lookup relation
https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.data_edit_record

SECTION:
Edit a Record with a Custom Layout Using lightning-record-edit-form

Is it missing a </lightning-record-edit-form>?
Also, should the second div class be 2-of-2?

Thanks for helping a budding developer.
I have tried and tried but I keep getting a ton of errors so I am reaching out to you all for help again! I need to write a trigger that will not allow a user to create a task on a case when the case status is "closed". Thank you!!!!
Q. A change set deployment from a sandbox to production fails due to a failure in a managed package unit test. The developer spoke with the managed package owner and they determined it is a false positive and can be ignored. What should the developer to do successfully deploy?

A. Edit the managed package’s unit test.
B. Select fast deploy to run only the tests that are in the change set.
C. Select “Run local tests” to run only the tests that are in the change set.
D. Select “Run local tests” to run all tests in the org that are not in the managed package.
Dear Team ,

I have to edit email template in salesforce classic . Plz have a look on snapshot and let me know how to editUser-added imageThanks & Regards
Sachin Bhalerao
Hi,

I'm trying to query all notes related to a contact, displaying these notes with title and textpreview and also order them by date. I also need this to be pageable.

I'm using SOQL. Now, my  solution at first was that I select all item from the ContentDocumentLink table which has the contactId I'm working on. With this I could get all ContentDocumentId for this contact (obviously these are not all Notes). The next step would be to query the ContentVersion table where I can use the ContentDocumentIds from the previous step and filter out items where the FileType are not "SNOTE".

However this solution is not really good for what I want to achieve as I still lacks the paging feature. I could use limit/offset with the ContentDocumentLink table but there not every item are Note.

I also try to worl with the ContentNote table directly but I still would need to get it to pair them to the contact so I'm kind of stucked.

Is there a simpler way to achieve this?

Thanks for the answers!
Hi Aloha !

I created a super flow of death with flow builder here:

User-added image

This flow works well is integrated perfectly in my organization with the lightning application generator, the proof in image:

User-added image

I want to integrate my flow into an external site (third party). To do this, I have to use Lightning Out.

So I created a lightning component to embed my flow with the following code: 
 
<aura:component>
    <aura:handler name="init" value="{!this}" action="{!c.init}" />
    <lightning:flow aura:id="flowData" />
</aura:component>
and
({
    init : function (component) {
        // Find the component whose aura:id is "flowData"
        var flow = component.find("flowData");
        // In that component, start your flow. Reference the flow's API Name.
        flow.startFlow("myFlow");
    },
})
This code, I got it from the official salesforce documentation here: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_using_flow_cmp.htm

Obviously, I replace the value "myFlow" by the API name of my flow.

Puis, j'intégre mon flow à une application lightning pour le tester avec le code suivant :
 
<aura:application >
    <c:testFlow/>
</aura:application>

"testFlow" is the name of my component.

You notice that I did not add Lightning Out dependencies voluntarily, to have a simple overview of my flow in a lightning application.

When I show my flow in with the Previous button of the console, my flow is like this:

User-added image

Someone has an idea of the problem?
I am trying to query records from big object in a list, using the following query
'Select Edit_Date__c ,CreatedDate,Field__c ,Loan_ID__c ,New_Value__c ,Old_Value__c ,User__c, System_Updates__c, Audit_ID__c FROM Loan_Audit__b limit 1000'.
I want to return most recent created records in the list using the above query. The above query is not allowing me to add  'ORDER BY  CreatedDate DESC'  so that i can sort the records as the latest created records appers first.Please provide me some solution or any workarounds to sort this records.
Below is the json data i am recieving.I want to get the value of datetime,accesskey and accesssecret in apex
{"hotelogix":{"version":"1.0","datetime":"2019-11-13T05:40:14","response":{"status":{"code":0,"message":"success"},"accesskey":"0vi1yR7ssx4IMrw","accesssecret":"rbgTdw6kfpE8ZQV"},"request":{"method":"wsauth","key":"5151BE0BE4A9B667C07"}}}
User-added image
When click on flow it's throwning above error
this flow is calling external services.i updated latested  url also but it's not working .
 this flow is working in other sandboxs but in developer sandbox it's not working ..
i redeplyod  this flow  still it's not working

Please help me

Thanks,
Mahesh  
  • November 29, 2019
  • Like
  • 0
I have error 404  message while opening the trailhead playground 1 it showing 404 error past 1 week it showing same error ..there is any resolved solution
Hi All,
can any tell how to give enter inside between Hi and Every One
<text> Hi Every One </text>
 
managed package expiration date missing why; I am looking for the expiration date of package, Salesforce Communities Management (for Communities with Chatter. I found it a free package, does this mean that it will never expire...I wanted to track if it is active in the organization too.. check the below mentioned article, but it did not help:

https://help.salesforce.com/articleView?id=distribution_package_detail.htm&type=5
Is there any way of displaying a picklist within an aura datatable?

I've read that only certain data types can be used within a datatable, but there must be a way of displaying a picklist or something similar where the user can select a value from a list of values?

Anybody managed to do this?
 
  • November 28, 2019
  • Like
  • 0
I am trying to create a custom URL button , through which i want to set field value.. is there any way to do it?
 
Dear Team ,

How we can define in Standard Objects that which product belongs to which Account ?

Thanks & Regards
Sachin Bhalerao
Hi All , 

I am facing the below error while trying to complete the Trial head challenge 

Challenge : Create an Apex trigger for Account that matches Shipping Address Postal Code with Billing Address Postal Code based on a custom field

Error : Setting 'Match_Billing_Address__c' to false updated the records anyway. The trigger should only act when Match_Billing_Address__c is true.

Thanks 
K.VenkataSubramanyam
I am somehow new to developing and currently working on Apex Integration Services module in Trailhead am on the third unit (Apex SOAP Callouts). I happen to have issues in downloading and saving a WSDL file to my PC. When I click the provided link on Trailhead it redirects me to a webpage that has a code without any button to download and save the file in my PC. I will appreciate if I can get any assist to work around this.The page I get that does have dowloading instructions.
The actual code is running,
But while writting the unit testing it is giving the above error,
The code does a part where it updates the contact and user details of the user. This user which is being updated is not the logged in one.
Please guide.
How can I migrate the logs to another org? Export from org X and import into org Y. (Users, Accounts, etc.)
What does this mean?
Salesforce Error ID: 1194933230-286794 (-991972232)

Can you also point me to documentation?
Thanks
Hi Folks,

I have a scenario to restrict a community user from creating more than 1 private chatter group. Trigger has been created for this. Now while covering the trigger handler class via test class, I am facing the issue on how to create a chatter group for community users via apex. Is this a constraint??
Any suggestions or workarounds for this.

Thanks
Can we import SurveySubjects through Workbench?
Hi community,

I created a new scratch org for developing a new lightning web component.  I'm trying to debug it, but I can't see any debug logs in either the developer console or in settings.  I also tried pulling the from the CLI and it says that there aren't any logs.  I have set user and Apex class trace flags, but still no logs.  I know that the class is being called because it's returning data to the lightning web component.  Has anyone else encoutered this problem?
Hi,
my custom object has a lookup with USer object-- createdBY
i am trying to fetch the data from custom object as
createdby.name but the field is not fetching, please help with this.
Thanks
Someone can tell me why im getting this error? Its seems a good code for me.

public class AccountHandler {
    public static Account insertNewAccount (String Nome){
        try
        {
               Account acct = new Account();
            acct.Name = Nome;
            insert acct;
            return acct;
        } catch (DmlException e){
            System.debug('A DML exception has ocurred: '+ e.getMessage());
            return null;
        }
    }
}
Hi,
I am doing J2S Trailmix2 module Salesforce mobile App Customization - Compact Layout.
I am getting below error :
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: CJNQNWGT.

Please help me...! Thanks in Advance
I am trying to write a batch apex to schedule and delete cases that were created before 18 months along with the related files. Can someone help me with formulating the query, please?
Hi, everyone.

I'm a Salesforce beginner and I need help with this code. I want to this "Don't show this again checkbox" makes the modal to stop showing up instead of the handler doInit. I thought that I could only change the function position on the component, but it doesn't work. Can any of you help me step by step to make this works, please? I appreciate your time and patience. Here is my code:

Component
<aura:component implements="flexipage:availableForAllPageTypes"
                access="global">
    
<!--<aura:handler name="init" action="{!c.doInit}" value="{!this}"/>-->
<aura:attribute name="isModalOpen" type="boolean" default="false"/> 
    
	<div class="demo-only">
        <!--Use aura:if tag to display/hide popup based on isModalOpen value-->  
        <aura:if isTrue="{!v.isModalOpen}">
  <section role="dialog" tabindex="-1" class="slds-modal slds-fade-in-open slds-modal_small" aria-labelledby="welcome-mat-95-label" aria-describedby="welcome-mat-95-content" aria-modal="true">
    <div class="slds-modal__container">
      <header class="slds-modal__header slds-modal__header_empty">
        <lightning:buttonIcon iconName="utility:close"
                                              onclick="{! c.closeModel }"
                                              alternativeText="close"
                                              variant="bare-inverse"
                                              class="slds-modal__close"/>
      </header>
      <div class="slds-modal__content" id="welcome-mat-95-content" style="overflow: hidden">
        <div class="slds-welcome-mat slds-welcome-mat_splash">
          <div class="slds-welcome-mat__content slds-grid">
            <div class="slds-welcome-mat__info slds-size_1-of-1">
              <div class="slds-welcome-mat__info-content">
                <h2 class="slds-welcome-mat__info-title" id="welcome-mat-95-label">The Lightning Experience is here!</h2>
                <div class="slds-welcome-mat__info-description slds-text-longform">
                  <p>Welcome to Lightning Experience, the modern, beautiful user experience from Salesforce. With a sales-and service-centric mindset, we focused on reinventing the desktop environment to better support your business processes.</p>
                </div>
                <div class="slds-welcome-mat__info-actions">
                  <button class="slds-button slds-button_brand">Learn More</button>
                 <div class="slds-m-top_large">
                    <div class="slds-form-element">
                      <div class="slds-form-element__control">
                        <div class="slds-checkbox">
                          <input type="checkbox" name="init" id="checkbox-8" onchange="{!c.doInit}" value="{!this}" />
                          <label class="slds-checkbox__label" for="checkbox-8">
                            <span class="slds-checkbox_faux"></span>
                            <span class="slds-form-element__label">Don&#x27;t show this again</span>
                          </label>
                        </div>
                      </div>
                    </div>
                  </div> 
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </section>
            
  <div class="slds-backdrop slds-backdrop_open"></div>
     </aura:if>
</div>
</aura:component>

Controller
({
   doInit: function(component, event, helper) { 
 var temperorySession = sessionStorage.getItem('tempSession');
  if(temperorySession == '1')
        {  
      console.log('===== in If');
            component.set("v.isModalOpen", false);
  }
        else
        {
      console.log('===== in else');
      component.set("v.isModalOpen", true);
  }
   sessionStorage.setItem('tempSession', '1');
 },
  
   closeModel: function(component, event, helper) {
      // Set isModalOpen attribute to false  
      component.set("v.isModalOpen", false);
   },
})

Style
 
.THIS.pop-up {
    display: block;
    opacity: 1;
    visibility: visible;
    background-color: transparent;
}

.THIS .slds-modal__inner {
    background: yellow;
    padding: 20px;
    text-align:left;
}

.THIS .slds-modal__pinner {
    background: #fff;
    padding: 20px;
}

Best Regards,

Camila Camargo
Full Stack Developer
Hello All,

I am very new to Lightning development and salesforce in general.

I am trying to make a simple component that consists of tabs with a graph in each one. I have directly copied and pasted the example of a simple tabset from (https://developer.salesforce.com/docs/component-library/bundle/lightning:tabset/example

My issue is that the styling looks like it is entirely missing. Below is a picture of the result: 
User-added image

I have noticed that I am getting an error that may or may not be related to this but I have been unable to find anything about it other than to modify our CSP which doesn't sound right to me. paste of the  error below: 

Refused to run the JavaScript URL because it violates the following Content Security Policy directive: "script-src 'self' 'nonce-[removed as im not sure if this is sensitive]' chrome-extension: 'unsafe-inline' 'unsafe-eval' https://sfdc.azureedge.net *.cs19.visual.force.com https://ssl.gstatic.com/accessibility/". Note that 'unsafe-inline' is ignored if either a hash or nonce value is present in the source list.

This error is repeated each time I click on an item in the tabset.

Has anyone had this issue or know what is possibly causing it? Any help would be greatly appreciated.

Thanks,
Travis
Hi, I'm trying to create a new empty project using the Salesforce CLI and I receive the message "ERROR running force:project:create  Cannot read property 'create' of undefined".    Does anyone know what might be causing this or how to further troubleshoot it? 

The command I'm entering in the terminal is "sfdx force:project:create --projectname VSCodeQuickStart".   I've tried "sfdx force:project:create --projectname VSCodeQuickStart --manifest" as well.


Thank you


 
We have a VisualForce page that needs to be displayed on our website through an iframe. The problem is that both Mozilla and Chrome are displaying error message, saying that the connection is not secured. 

"Your connection is not secure
The owner of xyz.force.com has configured their website improperly. To protect your information from being stolen, Firefox has not connected to this website."

I checked the configuration of our site in Salesforce. It looks like HTTPS is enabled. We have a self-signed certificate, but that's it. 

We're using Salesforce Classic and for the moment there's no project to use tools like Canvas or Lightning out...  
Any suggestions? 
Thanks.  

Good Morning folks,

I have a component to inset case, but is experiencing an error of  log:
 

"first error: INVALID_FIELD, Cannot specify both an external ID reference Account and a salesforce id, AccountId: []"


Basically this code :
 

Component.cmp

 <aura:attribute name="caseObj" type="case" default="{'sobjectType': 'Case',
                         'AccountId': '',
                         'MSISDN__c': '',
                         'Status': ''
                    }"/>



<label>Montadora</label>
       <force:inputField aura:id="AccountId"  value="{!v.caseObj.AccountId}"/>
           
</div>
<div class="form-group">
            <label>MSISDN</label>
            <ui:inputText class="form-control" value="{!v.caseObj.MSISDN__c}"/>
</div>  
    
    
    <div class="form-group">
            <label>Status</label>
            <force:inputField aura:id="Status"  value="{!v.caseObj.Status}"/>
</div>   


-----------------------------------------------------------

controller.js

  create: function(component, event, helper)    {
        
        console.log('Create record');
    
        var caseObj = component.get("v.caseObj");
        
        
        var action = component.get("c.createRecord");
      
        
        action.setParams({
            caseObj : caseObj
        });



-------------------------------------------------------------------

Class.apxc

 @AuraEnabled
    public static void createRecord (Case caseObj){
        
        try{
            System.debug('NovoCasoComponentController::createRecord::caseObj'+ caseObj);
            
            if(caseObj != null){
                insert caseObj;
            }
            
        } catch (Exception ex){
            
        }
        
    }    




Thanks

I'd like to get the Sites domain that configured for an org via Apex in order to automate some setup work.  I haven't found a way to do that.  It's probably not there but just in case I missed it in the documentation I figured I'd ask if anyone knows if there's any kind of metadata call to get it.

This is not specific to any one site and VF is not in place so anything that only exists in the context of an executing Site will not work.
I'm trying to create a button that will toggle a checkbox (i.e. if checked then uncheck, if unchecked then check). This checkbox will trigger a workflow rule that will send an email to the contact 24 hours later.

I realize that these buttons may become obsolete in Lightning, but my org does not wish to switch in the forseeable future (not my decision).

Any help is much appreaciated!
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();
        }
    }
       
})