• Ravindra1 v
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
Hi Everyone,

I had a scenario, where i'm fetching parent field data through child record and able to display them in a table. The problem i got is, for the parent fields there is no dynamic binding happening. Here is my code:

Aura Component:



<aura:component controller="AddPoCtrl">
    <aura:attribute name="QuoteLineList" type="Quote_Line_Items__c[]"/>
    <aura:handler name="init" value="{!this}" action="{!c.QuoteLines}"/>
    
    <table class="slds-table slds-table--bordered common-table-details" role="grid">
        <aura:iteration items="{!v.QuoteLineList}" var="item" indexVar="index">
               <tr class="slds-hint-parent"> 
               <td>{!index}</td>
               <td><lightning:input type="text" value="{!item.Quantity__c}"/></td> 
               <td><lightning:input type="text" value="{!item.Price__c}" /></td>
               <td data-index="{!index}"><c:customLookup objectAPIName="Quote__c" selectedRecordId="{!item.Quote__c}"></c:customLookup>
                </td>
               <td ><ui:inputTextArea value="{!item.Quote__r.Description__c}"/></td>
               <td ><ui:inputText value="{!item.Quote__r.Price__c}"/></td> 
                </tr>
        </aura:iteration>
    </table>
    <lightning:button name="Save" label="Save" onclick="{!c.Save}"/>
</aura:component> 

Lightning Controller js:

({
    QuoteLines : function(cmp, event, helper) {
        var apexCalls = cmp.get('c.getQuoteLines');
        apexCalls.setCallback(this,function(res){
            if(res.getState() === 'SUCCESS'){
                cmp.set('v.QuoteLineList',res.getReturnValue());
                console.log(cmp.get('v.QuoteLineList'))    
            }
        });
        $A.enqueueAction(apexCalls);
    },
     
   Save : function(cmp,evt,helper){
        console.log(cmp.get('v.QuoteLineList'));
    }
})


With this, when i make changes to parent fields(like Description__c & Price__c) and click on save the changes are not reflecting like child fields(Quantity__c & Price__c). 

Please help me on how to get the updated values of parent fields?
Hi,

I'm trying to implement the below piece of code for getting an integration between Salesforce & Azure:

https://developer.salesforce.com/forums/?id=906F0000000AlRNIA0

But when i do that i'm getting Error #403. I'm aware of the error description but unable find the right path for it. For more details about the error,see here:

https://stackoverflow.com/questions/45976574/azure-rest-api-communication/45995210#45995210

Thank you in advance.
Hi Everyone,

I had a scenario, where i'm fetching parent field data through child record and able to display them in a table. The problem i got is, for the parent fields there is no dynamic binding happening. Here is my code:

Aura Component:



<aura:component controller="AddPoCtrl">
    <aura:attribute name="QuoteLineList" type="Quote_Line_Items__c[]"/>
    <aura:handler name="init" value="{!this}" action="{!c.QuoteLines}"/>
    
    <table class="slds-table slds-table--bordered common-table-details" role="grid">
        <aura:iteration items="{!v.QuoteLineList}" var="item" indexVar="index">
               <tr class="slds-hint-parent"> 
               <td>{!index}</td>
               <td><lightning:input type="text" value="{!item.Quantity__c}"/></td> 
               <td><lightning:input type="text" value="{!item.Price__c}" /></td>
               <td data-index="{!index}"><c:customLookup objectAPIName="Quote__c" selectedRecordId="{!item.Quote__c}"></c:customLookup>
                </td>
               <td ><ui:inputTextArea value="{!item.Quote__r.Description__c}"/></td>
               <td ><ui:inputText value="{!item.Quote__r.Price__c}"/></td> 
                </tr>
        </aura:iteration>
    </table>
    <lightning:button name="Save" label="Save" onclick="{!c.Save}"/>
</aura:component> 

Lightning Controller js:

({
    QuoteLines : function(cmp, event, helper) {
        var apexCalls = cmp.get('c.getQuoteLines');
        apexCalls.setCallback(this,function(res){
            if(res.getState() === 'SUCCESS'){
                cmp.set('v.QuoteLineList',res.getReturnValue());
                console.log(cmp.get('v.QuoteLineList'))    
            }
        });
        $A.enqueueAction(apexCalls);
    },
     
   Save : function(cmp,evt,helper){
        console.log(cmp.get('v.QuoteLineList'));
    }
})


With this, when i make changes to parent fields(like Description__c & Price__c) and click on save the changes are not reflecting like child fields(Quantity__c & Price__c). 

Please help me on how to get the updated values of parent fields?
Hi,

I want navigate from lightning to apex visualforce page. And I used window.top.location and the page will be shown without sidebar.
How to use navigateToURL? I tried to use like below js but it doesn't work.
navigateTest: function(component, e, helper){
        $A.get("e.force:navigateToURL").setParams({"url": "/apex/test"}).fire();

    }

Does someone know this? Thanks a lot.