• Sujit Das@Accenture
  • NEWBIE
  • 0 Points
  • Member since 2015
  • Senior software developer
  • Accenture


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

As per aura documentations, we can iterate over a List in aura iteration.
I am trying to create a nested aura iteration. The outer iteration will be on List< Account> accList and the inner iteration will iterate on List which will be obtained from the map Map< Id, List< Contact>> accContactMap.

I am trying to use the List in aura iteration like.
 
<aura:iteration items="{!v.accList}" var="account" indexVar="indexAcc">
<table class="slds-table slds-table--bordered slds-table--striped" style="margin-top:30px;">
    <tbody>
        <tr>
            <td>{!account.Name}</td>
        </tr>
        <tr>
            <!-- Use the account.Id to get the value of the map -->
            <aura:iteration items="{!v.accContactMap[account.Id]}" var="contact" indexVar="indexAcc">
                <table class="slds-table slds-table--bordered slds-table--striped" style="margin-top:30px;">
                    <tbody>
                        <tr>                
                            <td><div onclick="{!c.editContact}" data-index="{!indexCon}" style="color:#0070d2;cursor: pointer;">Edit</div></td>
                            <td>{!contact.Name}</td>
                        </tr>

                    </tbody>
                </table>
            </aura:iteration>                            
        </tr>                    
    </tbody>
</table>
</aura:iteration>

However, I am getting the following error. "Failed to save undefined: expecting a positive integer, found 'section' at column 14 of expression: v.formQueMap[section.Id]: Source". I tried using items="{!v.accContactMap.get('account.Id')}" with no luck.
Hi,

When I am trying to convert a array of task into JSON string in my lightning controller, only the 1st element is returned always even though the array has more values. Here is the code. Has anyone faced the same issue.

Component:
<aura:attribute type="Task[]" name="listTask" />

Controller:
var taskList = component.get("v.listTask"); //tried var taskList = component.get("v.listTask").slice(); as well
console.log(taskList.length); //Length is returned correctly e.g. 3

//converting the array into JSON string
var JSONStr = JSON.stringify(taskList); 
console.log(JSONStr); // [{"sobjectType":"Task","ActivityDate":"2016-3-3","Status":"In Progress","Subject":"task1"},[],[]]
Hi,

When I am trying to convert a array of task into JSON string in my lightning controller, only the 1st element is returned always even though the array has more values. Here is the code. Has anyone faced the same issue.

Component:
<aura:attribute type="Task[]" name="listTask" />

Controller:
var taskList = component.get("v.listTask"); //tried var taskList = component.get("v.listTask").slice(); as well
console.log(taskList.length); //Length is returned correctly e.g. 3

//converting the array into JSON string
var JSONStr = JSON.stringify(taskList); 
console.log(JSONStr); // [{"sobjectType":"Task","ActivityDate":"2016-3-3","Status":"In Progress","Subject":"task1"},[],[]]

Hi

 

I am trying to create my own custom home page. Is there a quick and easy way I can place the standard Salesforce Home Page components on this VF page (before I add my own stuff). In particular I need Calendar ,Tasks and Messages and Alerts.

 

 

Many thanks for any and all help,.

Ross

 

hi 

 

I want to check programatically what filters are applied for a salesforce report. Given that i ve salesforce id of a particular report how can i find what filters are applied?

I saw (from http://www.salesforce.com/us/developer/docs/api_meta/Content/meta_report.htm#ReportFilterItem) that "ReportFilterItem" contains  all filtering criteria. But i am not sure of how to access it. Because its not available as a field which can be queriable using soql.

 

it has to be dealt somehow with REST or SOAP or Metadata APIs .

I ve gone through all conversations in http://boards.developerforce.com/t5/Apex-Code-Development/Is-it-possible-to-call-Metadata-API-from-Apex-code-Getting-Error/m-p/119441#M14113 which eventually ended that we can access metadata api using retrieve() .. but it ll be returned in zip format which is difficult/ not possible to deal with..

 

Can any body help me with this?

 

thanks