I'm trying to fill <aura:attribute name="selectedQuotation" type="salesTool.Quotation__c" />
in any way that could works
Filling it with default value compile (means i can save the file)
default="{ 'sobjectType': 'salesTool__Quotation__c',
'Name': 'Test',
'Id':'',
'salesTool__Contact__c':'',
'salesTool__Package__c':'',
'salesTool__Signed__c':false,
'salesTool__Site__c':''
}"
But a "Uncaught Error: ComponentDef Config required for registration" Error is raised in browser logs at runtime. The folloing demonstration example works well for me :
<aura:attribute name="newExpense" type="salesTool.Expense__c"
default="{ 'sobjectType': 'salesTool__Expense__c',
'Name': '',
'salesTool__Amount__c': 0,
'salesTool__Client__c': '',
'salesTool__Date__c': '',
'salesTool__Reimbursed__c': false
}"/>
But my case is different in a way i use lookupFields and not only literals.
Filling it with an instance of myCustomObject through application event result in an other error. As it seems my aura:attribute is empty at the initialisation of the component, the variable last in a aura source code is null and cause error.
if (value.auraType === "Component" || !value.isLiteral()) {
var last = component.lastRenderedValue;
if (last !== value) {
var referenceNode = **last**.getReferenceNode();
If somebody have some better experience of lightning, I would appreciate some help ;)
last.getReferenceNode()
? Perhaps one of us can recommend an alternative approach.