Skip to main content
I am new to developing lightning components and have designed a very basic lightning component that is working in my sandbox but after deploying it using change sets to the production org, it is not working anymore.

 

The goal is to get the order name of the order record and present this on the order record page.

 

Apex Class

public class OrderController {

@AuraEnabled

public static List<Order> getOrders(Id recordId) {

return [Select Id, Name__c From Order Where Id = :recordId];

}

}

Controller

<aura:component controller="OrderController" implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" >

<aura:attribute name="recordId" type="Id" />

<aura:attribute name="Order" type="Order" />

<force:recordData aura:id="orderRecord"

recordId="{!v.recordId}"

targetFields="{!v.Order}"

layoutType="FULL"

/>

<lightning:card iconName="standard:contact" title="{! 'Project Name: ' + v.Order.Name__c}">

</lightning:card>

</aura:component>

In my sandbox this is how the component looks like:

 

Deploy an Aura Component Bundle from Sandbox to Production

 

After sending it to my live environment and adding the component to the page layout. It is not populated and stays empty. What am I missing?

 

Kind regards,

 

Noortje

 

 
4 answers
  1. Dec 4, 2019, 11:46 AM
    I found the problem: the deployment was not succesful because of the code coverage. I am not sure how to structure test classes for this apex class. Any tips? :)
0/9000