• suneel varma
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies
My task here is.
1.In at lightening:Datatable, i had 4 columns on that 3 columns would be inline edit option(like user will give the values on that cells and save it).
once save it,if the data is present on that cells,i need to restrict the edit option on data presented cells and for other cells to provide edit option.
please give some suggestions or any solutions on this...
thanks
My task here is.
1.In at lightening:Datatable, i had 4 columns on that 3 columns would be inline edit option(like user will give the values on that cells and save it).
once save it,if the data is present on that cells,i need to restrict the edit option on data presented cells and for other cells to provide edit option.
please give some suggestions or any solutions on this...
thanks
I am stuck trying to obtain a token via the JWT Bearer Token Flow. I followed the steps here https://dreamevent.secure.force.com/articleView?id=remoteaccess_oauth_jwt_flow.htm&type=5

1. Created the connected app and generated a JWT Bearer Token using the sample code provided by Salesforce

2. Authorised the app via the browser successfully with a POST request like the below

https://test.salesforce.com/services/oauth2/authorize?response_type=code&client_id=3MVG9KlmwBKoC7U3w7pS2H7mWZgOv7hyIA9Tj...90JmPpk&redirect_uri=https://test.salesforce.com/services/oauth2/success

3. Now trying to execute this from Postman using the below

https://test.salesforce.com/services/oauth2/token?assertion=e...ip5reUNICJbwa_tEDErguFZuSVjv8_eaO_wM6D9cM6ycAA73YBcw&grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer

 I keep on receiving the error 
    "error": "invalid_grant",
    "error_description": "expired authorization code"

Anybody experienced this previously? I would be grateful for help on this
Hi,
Am new to lightning and got stuck up with a small issue.
I have parent component 'TaskModel' which I will be invoking from quick action and will get record ID. I have child (inner component) which also requires record ID, hasRecordId didn't work in child component so I was trying to pass value from parent component using event. I tried all poosible ways (APPLICATION/COMPONENT event) still couldn't find out why child component event method is not executing.
<!--passAccountId.evt-->

<aura:event type="APPLICATION" description="Event template" >
<aura:attribute name="AccountId" type="String"/>
</aura:event>

<!--TaskModel.cmp--> 
<aura:component controller="AccountStatforStatus" implements="flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction" access="global" >
<aura:registerEvent name="navAccountId" type="c:passAccountId"/>
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
<aura:attribute name="showAccount" type="Boolean"/>
<aura:attribute name="recordId" type="Id"/>
<aura:if isTrue="{!v.showAccount}">
<c:accountProspectSuspectUpdate/>
</aura:if>
</aura:component>

<!--TaskModelController.js-->
({
    doInit : function(component, event, helper) {
        
        var evt = $A.get("e.c:passAccountId");
        alert('TM AID '+component.get("v.recordId"));
        var evtAid = component.get("v.recordId");
        evt.setParams({"AccountId":evtAid.toString()});
        evt.fire();
        alert('event fired');
        /*var compEvent = component.getEvent("navAccountId");
        alert('TM AID '+component.get("v.recordId"));
        var evtAid = component.get("v.recordId");
        compEvent.setParams({"AccountId":evtAid});
        compEvent.fire();*/
        var action = component.get("c.getAccountStat");
action.setParams({
"accountId": component.get("v.recordId")
});
// Register the callback function
action.setCallback(this, function(response) {
            var data = response.getReturnValue();
            component.set("v.showAccount",data);
            if(!data){
                alert('Not Fire');
                var createRecordEvent = $A.get("e.force:createRecord");
                createRecordEvent.setParams({
                    "entityApiName": "Task"
                });
                createRecordEvent.fire();
            }
        });
        $A.enqueueAction(action);
    }
})

<!--accountProspectSuspectUpdate.cmp-->
<aura:component controller="AccountStatforStatus" implements="force:appHostable,flexipage:availableForAllPageTypes">
<aura:handler event="c:passAccountId" action="{!c.ValueFromApplicationEvent}" />
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
<aura:attribute name="accountRecordId" type="Id" />
<aura:attribute name="selectedVal" type="String" />
<aura:attribute name="picklistValues" type="Object" />
<lightning:select value="{!v.selectedVal}" name="selectSP" aura:id="selectSP" label="Suspect/Prospect" required="true" >
<option value="" >--Choose One--</option>
<aura:iteration items="{!v.picklistValues}" var="sp">
<option value="{!sp}" text="{!sp}"></option>
</aura:iteration>
</lightning:select>
<lightning:buttonGroup>
<lightning:button variant="brand" label="Update" onclick="{! c.updateAccount }"/>
<lightning:button label="Cancel" />
</lightning:buttonGroup>
</aura:component>

<!--controller-->
({
doInit : function(component, event, helper) {
        var action = component.get("c.getPickListValuesIntoList");
action.setCallback(this, function(response) {
var list = response.getReturnValue();
component.set("v.picklistValues", list);
})
// Invoke the service
        $A.enqueueAction(action);
},
ValueFromApplicationEvent : function(component,event,helper){
var evtAid = event.getParam("AccountId");
alert('Event '+evtAid);
component.set("v.accountRecordId",evtAid);
},
updateAccount : function(component, event, helper) {
var action = component.get("c.updateAccountStat");
alert('Record Id'+component.get("v.accountRecordId"));
action.setParams({
"accountId": component.get("v.accountRecordId"),
"accountStat" : component.find("selectSP").get("v.value")
});
// Register the callback function
action.setCallback(this, function(response) {
var updateResult = response.getReturnValue();
if(updateResult === 'Success'){
alert('Success '+updateResult);
var createRecordEvent = $A.get("e.force:createRecord");
createRecordEvent.setParams({
"entityApiName": "Task"
});
createRecordEvent.fire();
}
else{
alert('Error '+updateResult);
}
});
$A.enqueueAction(action);
}
})

am not getting value to accountRecordId in child.

Please Help, Thanks in advance.
 
i am using below code.
editReord.cmp

<aura:component> 
    <ui:button label="Edit Record" press="{!c.edit}"/> 
</aura:component>

editRecordController.js
edit: function(component, event, helper) 
{
    var editRecordEvent = $A.get("e.force:editRecord");
    editRecordEvent.setParams({ "recordId": component.get("v.contact.Id") }); 
    editRecordEvent.fire(); 
}

when i am try to save controller it shows Invalid literal value [1, 1]: 'edit': Source.
what's error in the above code.