• Ravi Sankar 12
  • NEWBIE
  • 10 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies
User has edit access on the Territory2 standard field on opportunity. But the change link is not appearing to change the value. Admins can do it but other users do not see the change link to change the territory on opportunity.
I am trying to increase the width of lightning quick action. Tried many ways by reviewing different blogs. But no luck. Please help.
 
<aura:component controller="MassUpdate" implements="flexipage:availableForRecordHome,flexipage:availableForAllPageTypes,force:hasRecordId,force:lightningQuickActionWithoutHeader" access="global" >
	<aura:attribute name="data" type="customObject__c[]"/>
    <aura:attribute name="columns" type="List"/>
    <aura:attribute name="draftValues" type="Object" default="[]"/>
    <!-- handlers-->
    <aura:handler name="init" value="{!this}" action="{!c.Doit}"/> 
    <ltng:require styles="{!$Resource.Model_Width_Expand + '/main.css'}"/> 
    <div  >
      
        <lightning:datatable
            columns="{!v.columns }"
            data="{!v.data }"
            keyField="Id"    
            onsave="{!c.handleSaveEdition}"                 
        />
    </div> 
   
</aura:component>

 
I am trying to mass update child records with a lightning quck action on the parent record detail page. Not sure what is wrong with this code. I appreciate your help.
Component 

<aura:component controller="MassUpdateController " implements="flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction" access="global" >
	<aura:attribute name="data" type="object__c[]"/>
    <aura:attribute name="columns" type="List"/>
    <aura:attribute name="recordId" type="String"/>
    <!-- handlers-->
    <aura:handler name="init" value="{!this}" action="{!c.init }"/>        
    <div style="height: 300px">
        <lightning:datatable
            columns="{! v.columns }"
            data="{! v.data }"
            keyField="id"                 
        />
    </div>
</aura:component>


Controller:

({
	
		init: function(cmp,event, helper) {
        cmp.set('v.columns', [
            {label: 'Name', fieldName: 'Name', type: 'text'  }            
          //  {label: 'Provider Email', fieldName: 'ProviderEmail', type: 'email', editable: true },
          //  {label: 'Not Associated to this Location', fieldName: 'NotAssociatedToThisLocation', type: 'checkbox' }
            
        ]);
        helper.fetchData(cmp,event, helper);        
	}
})


Helper

({
    fetchData: function (cmp,event,helper) {
        var RecordId = component.get("v.recordId");
        action.setParams({
        	"recordId" : RecordId
    	});
        var action = cmp.get("c.getRecords");
        
        action.setCallback(this, function(response) {
            var state = response.getState();
            if (state === "SUCCESS") {
                var data = response.getReturnValue();
                cmp.set('v.data',data);
            }
            // error handling when state is "INCOMPLETE" or "ERROR"
        });
        $A.enqueueAction(action);
    }
})

Apex Controller

public class MassUpdateController {
	@AuraEnabled
    public static list<Managed_Care_Provider__c> getRecords(Id recordId){
        system.debug(' record Id ' + recordId);
        list<object__c> lstMC = [SELECT Id,Name from Object__c where Opportunity__c=: recordId];
        system.debug('---- list of MC ' + lstMC);
        return lstMC;
    }
}
I am trying to increase the width of lightning quick action. Tried many ways by reviewing different blogs. But no luck. Please help.
 
<aura:component controller="MassUpdate" implements="flexipage:availableForRecordHome,flexipage:availableForAllPageTypes,force:hasRecordId,force:lightningQuickActionWithoutHeader" access="global" >
	<aura:attribute name="data" type="customObject__c[]"/>
    <aura:attribute name="columns" type="List"/>
    <aura:attribute name="draftValues" type="Object" default="[]"/>
    <!-- handlers-->
    <aura:handler name="init" value="{!this}" action="{!c.Doit}"/> 
    <ltng:require styles="{!$Resource.Model_Width_Expand + '/main.css'}"/> 
    <div  >
      
        <lightning:datatable
            columns="{!v.columns }"
            data="{!v.data }"
            keyField="Id"    
            onsave="{!c.handleSaveEdition}"                 
        />
    </div> 
   
</aura:component>

 
I am trying to mass update child records with a lightning quck action on the parent record detail page. Not sure what is wrong with this code. I appreciate your help.
Component 

<aura:component controller="MassUpdateController " implements="flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction" access="global" >
	<aura:attribute name="data" type="object__c[]"/>
    <aura:attribute name="columns" type="List"/>
    <aura:attribute name="recordId" type="String"/>
    <!-- handlers-->
    <aura:handler name="init" value="{!this}" action="{!c.init }"/>        
    <div style="height: 300px">
        <lightning:datatable
            columns="{! v.columns }"
            data="{! v.data }"
            keyField="id"                 
        />
    </div>
</aura:component>


Controller:

({
	
		init: function(cmp,event, helper) {
        cmp.set('v.columns', [
            {label: 'Name', fieldName: 'Name', type: 'text'  }            
          //  {label: 'Provider Email', fieldName: 'ProviderEmail', type: 'email', editable: true },
          //  {label: 'Not Associated to this Location', fieldName: 'NotAssociatedToThisLocation', type: 'checkbox' }
            
        ]);
        helper.fetchData(cmp,event, helper);        
	}
})


Helper

({
    fetchData: function (cmp,event,helper) {
        var RecordId = component.get("v.recordId");
        action.setParams({
        	"recordId" : RecordId
    	});
        var action = cmp.get("c.getRecords");
        
        action.setCallback(this, function(response) {
            var state = response.getState();
            if (state === "SUCCESS") {
                var data = response.getReturnValue();
                cmp.set('v.data',data);
            }
            // error handling when state is "INCOMPLETE" or "ERROR"
        });
        $A.enqueueAction(action);
    }
})

Apex Controller

public class MassUpdateController {
	@AuraEnabled
    public static list<Managed_Care_Provider__c> getRecords(Id recordId){
        system.debug(' record Id ' + recordId);
        list<object__c> lstMC = [SELECT Id,Name from Object__c where Opportunity__c=: recordId];
        system.debug('---- list of MC ' + lstMC);
        return lstMC;
    }
}