• ALL STAR
  • 7827 Points
  • Member since 

  • Chatter
    Feed
  • 237
    Best Answers
  • 0
    Likes Received
  • 5
    Likes Given
  • 0
    Questions
  • 1039
    Replies
When I am trying to create Custom setting. Setting type is greyed out. Can any one tell me what is the problem. I am logged in as an Administrator.
User-added image
Hi!
I have a scenario where I need to check if a file has been added to a record. Does anyone have a sample code for this?

If there's an file attachment to the record, I'll update a checkbox.
Hello,

I have developed a webservice, i want to write a test class for the same. 
Can somone guide me on the test class ?

Thank you in advance 
Hi all,
I have created one vf page and one custom controller.But whenever i am trying to save data it is not happening and also it is not showing any error.

Anyone help me on this.



Controller
public class EmployeeController
{
     
    
    public Employee__c abc{get;set;}
  
    

    public EmployeeController()
    {     
       abc = new Employee__c();

       
    //   abc = [Select id,Name,Birth_Date__c from Employee__c];
       
    }
    
  
    
    public PageReference save(){
        
        insert abc;
        return null;
        
    }
    
       
}



Vfpage
<apex:page lightningStylesheets="true" controller="EmployeeController" showHeader="false" standardStylesheets="false">


 <apex:pageBlock >    
        <apex:pageBlockSection columns="2">
             <apex:inputField value="{!abc.Name}"/> 
             <apex:inputField value="{!abc.Custom_Code__c}"/>      
        </apex:pageBlockSection>
            
        
               
            <apex:pageBlockSection title="Work Address">
                 <apex:inputField value="{!abc.Work_Address__c}"/>
                 <apex:inputField value="{!abc.Work_Address_Line_2__c}"/>
                 <apex:inputField value="{!abc.Work_City__c}"/>

                <apex:commandButton value="Save" action="{!save}" styleClass="slds-button slds-button_brand"/>
                
             </apex:pageBlockSection>
       </apex:pageBlock>

Thanks in advance
Hi, 

   In below code class CaseTriggerUtils
 
trigger CaseTrigger on Case (Before Insert, Before Update,After Insert, After Update){


   if(Trigger.isBefore) {
      CaseTriggerUtils.CaseUtils(Trigger.new);     
   } 
      

}
There is a error in line  
Map<Id, case> c = new Map<Id, case>([select id, casenumber,subject,createddate,ownerid,owner.name from case where subject like :('%' + CaseSubject + '%') order by createddate asc limit 10]);

When i try to update the case i am getting below error. 

Error: Invalid Data. 
Review all error messages below to correct your data.
Apex trigger CaseTrigger caused an unexpected exception, contact your administrator: CaseTrigger: execution of BeforeUpdate caused by: System.QueryException: Non-selective query against large object type (more than 200000 rows). Consider an indexed filter or contact salesforce.com about custom indexing. Even if a field is indexed a filter might still not be selective when: 1. The filter value includes null (for instance binding with a list that contains null) 2. Data skew exists whereby the number of matching rows is very large (for instance, filtering for a particular foreign key value that occurs many times): Class.CaseTriggerUtils.CaseUtils: line 31, column 1
public class CaseTriggerUtils {

 public static void CaseUtils(List<Case> newLst) {  
  
  String FWSubject;
  String RWSubject;
  String CaseSubject;
  
    for (Case c : newLst) {
       system.debug('Case Number :' + c.casenumber); 
       system.debug('Case Subject : ' + c.subject);
       system.debug('Case Subject length : ' + c.subject.length());
       system.debug('Case Owner Name : ' + c.owner.name);
       
       CaseSubject = c.subject;
       
       //Search for FW and RW key word were length of the subject is more than 18
        if(c.subject != null && c.subject.length() > 18){
            if(!c.subject.Contains('FW:')){
              FWSubject = c.subject.replaceAll('FW:','');
              System.debug('FQ Trim String :' + FWSubject);     
         }  
    
        if(!c.subject.Contains('RW:')){ 
         RWSubject = c.subject.replaceAll('RW:','');
         System.debug('RW Trim String :' + RWSubject);   
         }     
       }  
     }
     
   Map<Id, case> c = new Map<Id, case>([select id, casenumber,subject,createddate,ownerid,owner.name from case where subject like :('%' + CaseSubject + '%') order by createddate asc limit 10]);
   
     
   //Search for same case based on subject within 10days. 
   /* list<case> ctendays = [select id, casenumber,subject,createddate,ownerid,owner.name from case where subject like :('%' + CaseSubject + '%') order by createddate asc limit 10];

   for(case ctndays : ctendays){
      system.debug('Existing Cases :'  + ctndays.casenumber + ' ' + ctndays.subject + ' ' + ctndays.createddate + ' ' + ctndays.owner.name);      
   }  */
  
  }

}

 
  • February 14, 2019
  • Like
  • 0
Hello,

I have below error:
Maximum cumulative timeout for all callouts (HTTP requests or Web services calls) in a transaction

What are possible workarounds ?
 
My object pages with Salesforce do not show the hot links at the top of each page. How do I get them to appear? User-added image
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.  
i have an custom object called Drink_order
in that i have flavor,size and price fields
 i want to autoupdate price field depending upon the user selecting flavor and size
eg: flavor is apple
and size is large

can anyone please help me.
Hi Guys, I need help with a formula to update the Case 'Subject' field to 'Empty Chat' I want to use this as a 'Field Update from a workflow rule.

Any help would be appreciated
Hi! Help me to create a lightning component that if I click the CustomObject tab, it will display all of its records in data table. Just similar layout if we click an Object tab.

I’m new to lightning. Any help will be appreciated.
 Hi All,
        i have a Picklist field ACH Provider on Account which has some values. now i want to create a validation rule on this field when 
ACH provider == 'Other' ,and the Account Record type == 'Cachet' than it should give error.
how to make this validation Rule?
 Challenge Not yet complete... here's what's wrong:  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: XQBTDLTJ J
Can anybody tell me how to delete a process from process builder ?
Hello All,

I have a custom object, which has a lookup to case. I want unique case to be added to the custom object. I tried duplicate rules, matching rules, VLOOKUP, I was not able to get with these ways. Isthere any other way to achieve without coding?

Thanks.
Hello Stars,

Is it possible to set up Two-Factor Authentication for Community Users?

How?

Thank you very much.
Hi,

I have a CSV file  i want to upload this file in VF page and putting into custom object .
So how can we achieve this ?

Thanks in Advance.
Hi,
I am using a lightning edit record control and I want to display picklist values as radio buttons and selected picklist value in the backend should display, selected radio buttons. Is it possible using lightning editrecord and any other way to acheive this ? any help will be much appriciated.

Thanks 
Ravish
Hello,

I got error message like below:
caused by: System.QueryException: Non-selective query against large object type (more than 200000 rows). Consider an indexed filter or contact salesforce.com about custom indexing.
Even if a field is indexed a filter might still not be selective when:
1. The filter value includes null (for instance binding with a list that contains null)
2. Data skew exists whereby the number of matching rows is very large (for instance, filtering for a particular foreign key value that occurs many times)

 
When I am trying to create Custom setting. Setting type is greyed out. Can any one tell me what is the problem. I am logged in as an Administrator.
User-added image
Hi!
I have a scenario where I need to check if a file has been added to a record. Does anyone have a sample code for this?

If there's an file attachment to the record, I'll update a checkbox.
Hello,

I have developed a webservice, i want to write a test class for the same. 
Can somone guide me on the test class ?

Thank you in advance 
Hi Team, I want to change Domain name of my org. Please help me how to change the domain name.

Hi guys,
I have a Lightning Web Component, this component sits on the Record Page and gets the record id by import { getRecord } from 'lightning/uiRecord';

With this id and some Custom Metadata I query some data of this record by an apex class and give it back to the template to show it.

Now I want to refresh/call the apex class again to get the updated data if the record was updated.

How can I do this?

Hi all,
I have created one vf page and one custom controller.But whenever i am trying to save data it is not happening and also it is not showing any error.

Anyone help me on this.



Controller
public class EmployeeController
{
     
    
    public Employee__c abc{get;set;}
  
    

    public EmployeeController()
    {     
       abc = new Employee__c();

       
    //   abc = [Select id,Name,Birth_Date__c from Employee__c];
       
    }
    
  
    
    public PageReference save(){
        
        insert abc;
        return null;
        
    }
    
       
}



Vfpage
<apex:page lightningStylesheets="true" controller="EmployeeController" showHeader="false" standardStylesheets="false">


 <apex:pageBlock >    
        <apex:pageBlockSection columns="2">
             <apex:inputField value="{!abc.Name}"/> 
             <apex:inputField value="{!abc.Custom_Code__c}"/>      
        </apex:pageBlockSection>
            
        
               
            <apex:pageBlockSection title="Work Address">
                 <apex:inputField value="{!abc.Work_Address__c}"/>
                 <apex:inputField value="{!abc.Work_Address_Line_2__c}"/>
                 <apex:inputField value="{!abc.Work_City__c}"/>

                <apex:commandButton value="Save" action="{!save}" styleClass="slds-button slds-button_brand"/>
                
             </apex:pageBlockSection>
       </apex:pageBlock>

Thanks in advance
Please help
I  want to handle the click event for a lighting:button component

The onClick attribute for the component reference a javascript function in which resource in the component bundle?

1.heper.js
2.Controller.js
3.Rendered.js
4.handler.js 
When we activate the Critical Update: Remove Instance Names From URLs for Visualforce, Community Builder, Site.com Studio, and Content Files within our development environment, a Visualforce page within our package, that only contains an iFram, no longer loads. I've attempted to whitelist the domain for the url we are trying to iFrame, but have not been successful. 

To narrow in on the cause, I deactivated the critical update, and found the iFramed page loaded successfully in Salesforce. I activated the Critical Update again, and the iFrame no longer loaded.

Below is our code for the VisualForce page, I swapped in Salesforce.com for testing purposes. Any ideas anyone could offer would be much appreciated!

<apex:page showHeader="true" sidebar="false" tabStyle="iFrame__tab"> <apex:iframe src="https://www.salesforce.com" frameborder="false" height="800px" scrolling="true"/> </apex:page>
I have a custom link which checks whether the theme is lightning, if yes redirecting to lightning report, if no redirect to classic report.
IF({!$User.UIThemeDisplayed}="Theme4d",
This is the condition check I am doing. And I am getting Theme3 as the theme for both classic and lightning .
I am not able to distinguish between lightning and classic with this global variable.
Any help is much appreciated
How to get field createdby for a custom field.....
User-added image
Hello guys,

I have just started developing and I am following the current situation:

we're using community and we want to implement email-to-case. The only problem is that with partner licenses we cannot reply emails directly from Case object and this is mean that if we receive a case from email to case, we can only reply by email and this is also mean that we will get a new case for each reply and it will be a real mess in our salesforce.

I read that you can do some tricks by code. Any idea how to write a trigger that would do the following:

If the person will reply back to the current case, then the trigger will add the conversation to the first case and will delete the second case and so on.

I hope this is clear and someone can help with this!

Thanks a lot!

 
Hello Guys,

What will be the impact for the Org, If we enable the opportunity splits in the opportunity level???




 
Hi, 

   In below code class CaseTriggerUtils
 
trigger CaseTrigger on Case (Before Insert, Before Update,After Insert, After Update){


   if(Trigger.isBefore) {
      CaseTriggerUtils.CaseUtils(Trigger.new);     
   } 
      

}
There is a error in line  
Map<Id, case> c = new Map<Id, case>([select id, casenumber,subject,createddate,ownerid,owner.name from case where subject like :('%' + CaseSubject + '%') order by createddate asc limit 10]);

When i try to update the case i am getting below error. 

Error: Invalid Data. 
Review all error messages below to correct your data.
Apex trigger CaseTrigger caused an unexpected exception, contact your administrator: CaseTrigger: execution of BeforeUpdate caused by: System.QueryException: Non-selective query against large object type (more than 200000 rows). Consider an indexed filter or contact salesforce.com about custom indexing. Even if a field is indexed a filter might still not be selective when: 1. The filter value includes null (for instance binding with a list that contains null) 2. Data skew exists whereby the number of matching rows is very large (for instance, filtering for a particular foreign key value that occurs many times): Class.CaseTriggerUtils.CaseUtils: line 31, column 1
public class CaseTriggerUtils {

 public static void CaseUtils(List<Case> newLst) {  
  
  String FWSubject;
  String RWSubject;
  String CaseSubject;
  
    for (Case c : newLst) {
       system.debug('Case Number :' + c.casenumber); 
       system.debug('Case Subject : ' + c.subject);
       system.debug('Case Subject length : ' + c.subject.length());
       system.debug('Case Owner Name : ' + c.owner.name);
       
       CaseSubject = c.subject;
       
       //Search for FW and RW key word were length of the subject is more than 18
        if(c.subject != null && c.subject.length() > 18){
            if(!c.subject.Contains('FW:')){
              FWSubject = c.subject.replaceAll('FW:','');
              System.debug('FQ Trim String :' + FWSubject);     
         }  
    
        if(!c.subject.Contains('RW:')){ 
         RWSubject = c.subject.replaceAll('RW:','');
         System.debug('RW Trim String :' + RWSubject);   
         }     
       }  
     }
     
   Map<Id, case> c = new Map<Id, case>([select id, casenumber,subject,createddate,ownerid,owner.name from case where subject like :('%' + CaseSubject + '%') order by createddate asc limit 10]);
   
     
   //Search for same case based on subject within 10days. 
   /* list<case> ctendays = [select id, casenumber,subject,createddate,ownerid,owner.name from case where subject like :('%' + CaseSubject + '%') order by createddate asc limit 10];

   for(case ctndays : ctendays){
      system.debug('Existing Cases :'  + ctndays.casenumber + ' ' + ctndays.subject + ' ' + ctndays.createddate + ' ' + ctndays.owner.name);      
   }  */
  
  }

}

 
  • February 14, 2019
  • Like
  • 0
Hello,

I have below error:
Maximum cumulative timeout for all callouts (HTTP requests or Web services calls) in a transaction

What are possible workarounds ?
 
I have created a trigger(after update) on Lead which will fire on status change and create a contact and custom object record.

Issue is that trigger is working but creating around 7 records of contact and custom object , i am not able to debug this , any help would be helpful.

Trigger:

Trigger CreateContact on Lead (after insert, after Update) {
    if(Trigger.isInsert) {
        LeadTriggerHandler.createContact(Trigger.new);
    }
        if(Trigger.isUpdate) {
        LeadTriggerHandler.createContact(Trigger.new);
    }
}

Class:

public class LeadTriggerHandler {
    public static void createContact(List<Lead> leads) {
        List<Application__c> app = new List<Application__c>();
        List<Contact> contact = new List<Contact>();
           for(Lead acc : leads){
            if(acc.Status=='Interviewed'){
            Contact con = new Contact(LastName = acc.lastname,
                                     FirstName= acc.FirstName,
                                     RecordTypeId='someid');
            contact.add(con);
        }
        insert contact;
        }
        for(Lead acc : leads){
            if(acc.Status=='Interviewed'){
            Application__c a = new Application__c(Name = acc.Lead_Program_Name__c,
                                                 Program__c= acc.Program__c,
                                                 Last_Name__c= acc.LastName,
                                                 First_Name__c= acc.FirstName,
                                                 Program_Session__c= acc.Program_Session__c);
            app.add(a);
        }
        insert app;
        }
    }
}

 
Is it possible to copy the matrix values of a Dependent picklist from one object to another ?
Hello,

i try to implement in a Visualforce-Page but i cant get it work.  It seems that pagination is for StandardControllers or Extensions only. Or there any change to get it with fully custom controller?

Page:
<apex:page title="Production Figures" id="thePage" sidebar="false" docType="html-5.0" applyBodyTag="true" controller="CtrlProduction">
	
	<head>
		<link type="text/css" rel="stylesheet" href="{!$Resource.CtrlProductionCss}" />
		<link type="text/css" rel="stylesheet" href="{!URLFOR($Resource.jQueryResource, '/artDialog/skins/twitter.css')}" />
		<style type="text/css">
			th {
				white-space: inherit !important;
			}
		</style>
		
		
		<apex:includeScript value="{!URLFOR($Resource.jQueryResource, '/jquery1.11/jquery-1.11.0.min.js')}" />
		<script src="{!URLFOR($Resource.jQueryResource, '/glob-cultures/globalize.js')}" type="text/javascript"></script>
		<script src="{!URLFOR($Resource.jQueryResource, lc.jsPath)}" type="text/javascript"></script>
		
		<script src="{!URLFOR($Resource.jQueryResource, '/Utils.js')}"></script>
		<script src="{!$Resource.CtrlProductionJs}" type="text/javascript"></script>
		<script src="{!URLFOR($Resource.jQueryResource, '/artDialog/artDialog.min.js')}"></script>
        <script src="{!URLFOR($Resource.jQueryResource, '/artDialog/artDialog.plugins.min.js')}"></script>
		<script type="text/javascript">
			;function setFocusOnLoad(){}
        	var CUSTOM_LABEL = {
        		'save' : '{!$Label.Save_Message}', 
        		'cancel' : '{!$Label.Production_Cancel_Message}',
        		'nopm': '{!$Label.No_Permission}'
        	};
			addListener(window, 'load', initDocument, {'locale':'{!lc.locale}'});
        </script>

	</head>
	<body>
		<apex:form >
			<apex:sectionHeader title="{!$Label.Production_Figures}" />
			<apex:inputHidden id="isGroup" value="{!Competence}"/>
			<apex:actionFunction name="save" action="{!save}" oncomplete="saveComplete()" reRender="bodyContentId, themsg" />
			
			<div id="dmsgid"><apex:pageMessages id="themsg"/></div>
			<div id="pageLoading" class=""></div>
			<div id="popupLoading" style="display: none;"></div>

			<div class="content" id="contentAll">
			
				<div class="headerButtonDiv tc">
					<input type="button" class="commonButton Btn_save" value="{!$Label.Save_Button}" />
					<input type="button" class="commonButton Btn_cancel" value="{!$Label.Cancel_Button}" />
				</div>
				
				<div class="tableDiv">
					<c:CompProductionBody pageCtrl="{!this}" id="comptableid"></c:CompProductionBody>
				</div>
				
				<div class="footerButtonDiv tc">
					<input type="button" class="commonButton Btn_save" value="{!$Label.Save_Button}" />
					<input type="button" class="commonButton Btn_cancel" value="{!$Label.Cancel_Button}" />
				</div>
				
			</div>
			            <apex:panelGrid columns="7">
                <apex:commandButton status="fetchStatus" reRender="pb" value="|<" action="{!first}" disabled="{!Not(hasPrevious)}" title="First Page"/>
                <apex:commandButton status="fetchStatus" reRender="pb" value="<" action="{!previous}" disabled="{!Not(hasPrevious)}" title="Previous Page"/>
                <apex:commandButton status="fetchStatus" reRender="pb" value=">" action="{!next}" disabled="{!Not(hasPrevious)}" title="Next Page"/>
                <apex:commandButton status="fetchStatus" reRender="pb" value=">|" action="{!last}" disabled="{!Not(hasPrevious)}" title="Last Page"/>
                <apex:outputText >{!(pageNumber * size)+1-size}-{!IF((pageNumber * size)>noOfRecords, noOfRecords,(pageNumber * size))} of {!noOfRecords}</apex:outputText>
                <apex:commandButton status="fetchStatus" reRender="pb" value="Refresh" action="{!refresh}" title="Refresh Page"/>
                <apex:outputPanel style="color:#4AA02C;font-weight:bold">
                    <apex:actionStatus id="fetchStatus" startText="Fetching..." stopText=""/>
                </apex:outputPanel>
            </apex:panelGrid>
		</apex:form>
	</body>

</apex:page>
Component with data:
<apex:component >
    <apex:attribute name="pageCtrl" type="CtrlProduction" required="true" description="the root page controller reference" />
    <apex:outputPanel layout="block" id="bodyContentId">
        <apex:inputHidden id="saveJsonList" value="{!pageCtrl.saveJson}"/>
        <div class="divcomponentbox">
            <table class=" table_fix oemTable" border="0" cellspacing="0" cellpadding="0">
                <colgroup class="currentColgroup">
                    <apex:repeat var="column" value="{!pageCtrl.columnlist}">
                        <col class="{!column.name}" />
                    </apex:repeat>             
                </colgroup> 
                
                <thead>
                    <tr>
                        <th class="thheight tc blcolor btcolor thbr"></th>
                        <th class="thheight tc btcolor brcolor" colspan="{!pageCtrl.columnyearmap['currentyear'].colspan}">{!pageCtrl.columnyearmap['currentyear'].value}</th>
                        <th class="thheight tc space"></th>
                        <th class="thheight tc btcolor" colspan="{!pageCtrl.columnyearmap['nextyear'].colspan}">{!pageCtrl.columnyearmap['nextyear'].value}</th>
                    </tr>
                    <tr >
                        <apex:repeat var="column" value="{!pageCtrl.columnlist}">
                            <th class="thheight1 thbr tc {!column.name}"> 
                                <span class="field" >{!column.displayName}</span>
                            </th>
                        </apex:repeat>
                    </tr>
                </thead>
                
                
                <tbody id="actbodyid">
                    <!-- START each account list -->
                    <apex:variable value="{!0}" var="indextr" />
                    
                    <apex:repeat var="act" value="{!pageCtrl.accountlist}">
                        <tr data-value="{!act.valueJson}" data-id="{!act.accid}" data-cid="{!act.currentpfid}" data-nid="{!act.nextpfid}" 
                            data-name="{!act.name}" class="{!if(mod(indextr, 2) == 1, 'trOddStyle', '')} trbodycls">
                            <apex:variable value="{!indextr + 1}" var="indextr" />
                            <apex:variable value="{!0}" var="index" />
                            <apex:repeat var="column" value="{!pageCtrl.columnlist}">
                                <td class="tdheight thbr {!if(index = 0, '', 'tr')} ov {!column.name}" data-field="{!column.fieldname}">
                                    <div>
                                        <!-- //updated by Steven Qiao<rui.qiao@oinio.com> 2016-09-27 -->
                                        <span class="textspan">{!if(index = 0, act.name, '')}</span>
                                        <apex:inputText rendered="{!column.isInput}" styleClass="{!column.name}_input tr inputw" />
                                        <span class="percentspan"></span>
                                    </div>
                                </td>
                                <apex:variable value="{!index + 1}" var="index" />
                            </apex:repeat>
                        </tr>
                    </apex:repeat>
                    <!-- END each account list -->
                </tbody>
            </table>
        </div>

    </apex:outputPanel>
</apex:component>


Can someone give me an advise?

thanks
Peter
 

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();
        }
    }
       
})