How to reset value for sObject variable in controller in Salesforce lightning component?

How to reset value for sObject variable in controller in Salesforce lightning component?

Sample Code:

component.set(“v.newItem”,{ ‘sobjectType’: ‘Camping_Item__c’,
                    ‘Name’: ”,
                    ‘Quantity__c’: 0,
                    ‘Price__c’: 0,
                    ‘Packed__c’: false }/>);

Cheers!!!

Leave a Reply