• Amir BOUTITI
  • NEWBIE
  • 15 Points
  • Member since 2016


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

Hello, That's my problem.
I have a list of buttons in my lightning page. The button labels are retrieved from a table SF (iterations). The idea of ​​registering opportunities with the name of the label buttons.

my label-buttion itération:
                <div class="slds-col slds-size--1-of-12" >
                 <aura:iteration items="{!v.zones}" var="item">                
                <lightning:button label="{!item}" aura:id ="{!item}" name ="{!item}" class="{!'customButton' + v.indexBtn + ' slds-size--1-of-1 slds-p-horizontal_x-small'}" onclick="{!c.myAction}"/>
                   </aura:iteration>
                </div>  


can someone help me.
 
  • April 03, 2018
  • Like
  • 0

Hi everyone,

i'm getting the following error after the system checks the challenge:

"Challenge Not yet complete... here's what's wrong: 
There was an unexpected error in your org which is preventing this assessment check from completing: System.QueryException: List has no rows for assignment to SObject"

I already tested it via Apex and via REST Explorer in Workbench, the code seems fine to me:

@restResource(urlMapping='/Account/*/contacts')
global class AccountManager {
	
    @httpGet
    global static Account getAccount(){
        RestRequest request = RestContext.request;
        String accountId = request.requestURI.substringBetween('/Account/' , '/contacts');
        
        Account result = [SELECT Id, Name, (SELECT Id,Name FROM Contacts) FROM Account WHERE Id = :accountId];
  
        return result;

    }
    
}


Can somebody help me with this?

Thank you,
Fabio