function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dmsx2oddmsx2od 

Passing values and field names to a component

Hi all - I'm experimenting with using Components as data editors.

 

Use case:

1. In the detail (view) page layout for a Contact, show a component with its own save button.  (This is sorta like inline editing.)

2. Allow the component to display and edit any phone field on the object.  So, for instance, it could show HomePhone, OtherPhone, etc.

 

Do I need to pass the field value as a string {!Contact.HomePhone} AND pass the field name "Contact.HomePhone" so it can not only display the value, but also write to the Contact?

 

It looks like I may also need to change the attribute (string 'Contact.HomePhone') to a field so I can type 

Contact.HomePhone = '(212) 555-1212';

Any advice on doing that? It seems I may need to do a describe, and then get the field token.

 

Thanks,

David