• Hugo Santana 9
  • NEWBIE
  • 10 Points
  • Member since 2017

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

I am creating a lightning app that uses either Canvas or IFrame to point to a web app.

The URL of this app usually has the form https://Customer.myApp.com.

So far I have not found a way to do this besides:

1. Creating custom Managed packages with the specific Canvas URL.

Is there a way to modifiy the Customer part of the URL or modify the URL of a Canvas app or IFrame dynamically?
 
I am trying to complete the tutorial (Not the challenge) and I get the following error (See image):

Sorry to interrupt
An internal server error has occurred.
Error ID: 981780632-86360 (827702864)

This happens when I add the attribute section and try to run the app:
<aura:attribute name="newExpense" type="Expense__c"
     default="{ 'sobjectType': 'Expense__c',
                    'Name': '',
                    'Amount__c': 0,
                    'Client__c': '',
                    'Date__c': '',
                    'Reimbursed__c': false }"/>
Complete code at this point of the tutorial:
<aura:component>

	<aura:attribute name="newExpense" type="Expense__c"
     default="{ 'sobjectType': 'Expense__c',
                    'Name': '',
                    'Amount__c': 0,
                    'Client__c': '',
                    'Date__c': '',
                    'Reimbursed__c': false }"/>
    <!-- PAGE HEADER -->
    <lightning:layout class="slds-page-header slds-page-header--object-home">
        <lightning:layoutItem>
            <lightning:icon iconName="standard:scan_card" alternativeText="My Expenses"/>
        </lightning:layoutItem>
        <lightning:layoutItem padding="horizontal-small">
            <div class="page-section page-header">
                <h1 class="slds-text-heading--label">Expenses</h1>
                <h2 class="slds-text-heading--medium">My Expenses</h2>
            </div>
        </lightning:layoutItem>
    </lightning:layout>
    <!-- / PAGE HEADER -->

    <!-- NEW EXPENSE FORM -->
    <lightning:layout>
        <lightning:layoutItem padding="around-small" size="6">

        <!-- CREATE NEW EXPENSE -->
		<div aria-labelledby="newexpenseform">

    		<!-- BOXED AREA -->
    		<fieldset class="slds-box slds-theme--default slds-container--small">

    		<legend id="newexpenseform" class="slds-text-heading--small 
      			slds-p-vertical--medium">
     	 		Add Expense
    		</legend>

    		<!-- CREATE NEW EXPENSE FORM -->
   			<form class="slds-form--stacked">          
        		<lightning:input aura:id="expenseform" label="Expense Name"
                         name="expensename"
                         value="{!v.newExpense.Name}"
                         required="true"/> 
        		<lightning:input type="number" aura:id="expenseform" label="Amount"
                         name="expenseamount"
                         min="0.1"
                         formatter="currency"
                         step="0.01"
                         value="{!v.newExpense.Amount__c}"
                         messageWhenRangeUnderflow="Enter an amount that's at least $0.10."/>
        		<lightning:input aura:id="expenseform" label="Client"
                         name="expenseclient"
                         value="{!v.newExpense.Client__c}"
                         placeholder="ABC Co."/>
        		<lightning:input type="date" aura:id="expenseform" label="Expense Date"
                         name="expensedate"
                         value="{!v.newExpense.Date__c}"/>
        		<lightning:input type="checkbox" aura:id="expenseform" label="Reimbursed?"  
                         name="expreimbursed"
                         checked="{!v.newExpense.Reimbursed__c}"/>
                <lightning:button label="Create Expense" 
                          class="slds-m-top--medium"
                          variant="brand"
                          onclick="{!c.clickCreate}"/>
    		</form>
    		<!-- / CREATE NEW EXPENSE FORM -->

  			</fieldset>
  			<!-- / BOXED AREA -->

		</div>
		<!-- / CREATE NEW EXPENSE -->

        </lightning:layoutItem>
    </lightning:layout>
    <!-- / NEW EXPENSE FORM -->

</aura:component>


Screen Image of received error

Thanks in advance!
I am trying to complete the tutorial (Not the challenge) and I get the following error (See image):

Sorry to interrupt
An internal server error has occurred.
Error ID: 981780632-86360 (827702864)

This happens when I add the attribute section and try to run the app:
<aura:attribute name="newExpense" type="Expense__c"
     default="{ 'sobjectType': 'Expense__c',
                    'Name': '',
                    'Amount__c': 0,
                    'Client__c': '',
                    'Date__c': '',
                    'Reimbursed__c': false }"/>
Complete code at this point of the tutorial:
<aura:component>

	<aura:attribute name="newExpense" type="Expense__c"
     default="{ 'sobjectType': 'Expense__c',
                    'Name': '',
                    'Amount__c': 0,
                    'Client__c': '',
                    'Date__c': '',
                    'Reimbursed__c': false }"/>
    <!-- PAGE HEADER -->
    <lightning:layout class="slds-page-header slds-page-header--object-home">
        <lightning:layoutItem>
            <lightning:icon iconName="standard:scan_card" alternativeText="My Expenses"/>
        </lightning:layoutItem>
        <lightning:layoutItem padding="horizontal-small">
            <div class="page-section page-header">
                <h1 class="slds-text-heading--label">Expenses</h1>
                <h2 class="slds-text-heading--medium">My Expenses</h2>
            </div>
        </lightning:layoutItem>
    </lightning:layout>
    <!-- / PAGE HEADER -->

    <!-- NEW EXPENSE FORM -->
    <lightning:layout>
        <lightning:layoutItem padding="around-small" size="6">

        <!-- CREATE NEW EXPENSE -->
		<div aria-labelledby="newexpenseform">

    		<!-- BOXED AREA -->
    		<fieldset class="slds-box slds-theme--default slds-container--small">

    		<legend id="newexpenseform" class="slds-text-heading--small 
      			slds-p-vertical--medium">
     	 		Add Expense
    		</legend>

    		<!-- CREATE NEW EXPENSE FORM -->
   			<form class="slds-form--stacked">          
        		<lightning:input aura:id="expenseform" label="Expense Name"
                         name="expensename"
                         value="{!v.newExpense.Name}"
                         required="true"/> 
        		<lightning:input type="number" aura:id="expenseform" label="Amount"
                         name="expenseamount"
                         min="0.1"
                         formatter="currency"
                         step="0.01"
                         value="{!v.newExpense.Amount__c}"
                         messageWhenRangeUnderflow="Enter an amount that's at least $0.10."/>
        		<lightning:input aura:id="expenseform" label="Client"
                         name="expenseclient"
                         value="{!v.newExpense.Client__c}"
                         placeholder="ABC Co."/>
        		<lightning:input type="date" aura:id="expenseform" label="Expense Date"
                         name="expensedate"
                         value="{!v.newExpense.Date__c}"/>
        		<lightning:input type="checkbox" aura:id="expenseform" label="Reimbursed?"  
                         name="expreimbursed"
                         checked="{!v.newExpense.Reimbursed__c}"/>
                <lightning:button label="Create Expense" 
                          class="slds-m-top--medium"
                          variant="brand"
                          onclick="{!c.clickCreate}"/>
    		</form>
    		<!-- / CREATE NEW EXPENSE FORM -->

  			</fieldset>
  			<!-- / BOXED AREA -->

		</div>
		<!-- / CREATE NEW EXPENSE -->

        </lightning:layoutItem>
    </lightning:layout>
    <!-- / NEW EXPENSE FORM -->

</aura:component>


Screen Image of received error

Thanks in advance!