• rtvkgnde
  • NEWBIE
  • 30 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 3
    Questions
  • 2
    Replies
I have a custom checkbox field in an object, which is defaulted to checked always whenever a new record is created. Now, I need to uncheck it to false whenever I click on a button in my lightning component. How can I do this?
 I have a contract object, on which If any changes  are made and submit the record, the new values doesn't needs to be saved on the Contract object until the changes are approved via approval process. Once, the record is approved by the user!! It's when the changes needs to be updated to the Contract record. How can I achieve this?
Please Help!!

I tried creating a new custom component by implementing the required interfaces. But, when am trying to do an action override, Am not able to refer the lightning component that I created.

Am, I missing anything here?? Please suggest???
I have a custom checkbox field in an object, which is defaulted to checked always whenever a new record is created. Now, I need to uncheck it to false whenever I click on a button in my lightning component. How can I do this?
I am using a Mydomain enabled dev org on gs0 (Winter 16) and going throught the exercise in Trailhead. 

Follwed every step and when i click on Preview it takes me to my app (looks right) - https://skypeforbiz-dev-ed.lightning.force.com/c/Sfb.app

But it errors out with -

Lightning components require My Domain. Please contact your system administrator for more information.

Any idea what I might be missing? My org is defenitely provisioned with MyDomin.
component:
<aura:component implements="force:appHostable" controller="FetchRegistrations" >
    <aura:attribute name="reg" type="Registration__c[]"/>
    <ui:button label="Get Registrations" press="{!c.myAction}"/>
    <aura:iteration var="r" items="{!v.reg}" >
    <p>{!r.name}</p>
    </aura:iteration>
</aura:component>


Controller:
({
   myAction : function(component, event, helper) {
        var action = component.get("c.getAllregistrations");
        action.setCallback(this, function(response){
            var name = response.getState();
            if (name === "SUCCESS") {
                component.set("v.reg", response.getReturnValue());
            }
        });
     $A.enqueueAction(action);
    }
})

Apex:
global with sharing class FetchRegistrations {
@auraEnabled
    public static List<Registration__c> getAllregistrations()
    {
     List<Registration__c> reg=new LIST<Registration__c>();  
        reg=[select id,name,Email__c from Registration__c];
        return reg;
    } 
    public Registration__c getSelectedregistrations(Id id)
    {    
      Registration__c  reg=[select id,name,Email__c from Registration__c where id=:id];
        return reg;
    } 
   
}