We have a specific situation where we want to use just one component for all sObject related CRUD operations. I came across many examples on this site but they all expect you to define the aura:attribute tag upfront to bind the values. But in this case as we do not know the object upfront we could not know the fields upfront as well, hence not an easy task to define the aura:attribute tags for fields of all objects. Any suggestions on the approach?

1 Answer 1


You can use type="Object" to give the attribute a generic type. Then you can pass any JavaScript object as the value.

<aura:attribute name="data" type="Object" />


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .