I want to reset an attribute of type sObjectType in Lightning/Aura to the default value. I'm unable to reset even if I declare a dummy attribute of same sObjectType attaribute in component and assign it using the controller using
component.set("v.attribute1","v.dummyAttributetoReset");
<aura:attribute name="attribute1" type="l1.LightningObject__c" default="{ 'sobjectType': 'l1__LightningObject__c',
'Name': '',
'l1__Date__c': '',
'l1__Description__c': '',
'l1__Country__c': ''
}"/>
But this just resets the Date field on the form not other fields. When I assign the default value in JSON format(that we declare as default value in the component) it just thrown the error with JSON Parser exception.
Please help or any Suggestions!