0

I have gone through all the steps described in the documentation, but I don't understand why the personal account custom fields are not visible.

Needless to say that the custom fields (__pc) exist and work perfectly in other processes (apex, UI etc etc).

            <lightning-record-edit-form object-api-name="Account" onsubmit ={handleAccountSubmit}>

            <div class="slds-grid">
                <div class="slds-col slds-size_1-of-2">
                    <lightning-input-field
                            variant="label-stacked"
                            field-name='FirstName'>
                    </lightning-input-field>
                    <lightning-input-field
                            variant="label-stacked"
                            field-name='LastName'>
                    </lightning-input-field>
                    <lightning-input-field
                            variant="label-stacked"
                            field-name='PersonEmail'>
                    </lightning-input-field>
                    <lightning-input-field
                            field-name='PrefijoTelef__pc'>
                    </lightning-input-field>
                    <lightning-input-field
                            variant="label-stacked"
                            field-name='Phone'>
                    </lightning-input-field>
                </div>

                <div class="slds-col slds-size_1-of-2">
                    <lightning-input-field
                            variant="label-stacked"
                            field-name='CanalDeEntrada__pc'
                            value={leadSourceDefaultValue}>
                    </lightning-input-field>
                    <lightning-input-field
                            variant="label-stacked"
                            field-name='DetalleDelCanalDeEntrada__pc'>
                    </lightning-input-field>
                    <lightning-input-field
                            variant="label-stacked"
                            field-name='ComoNosHaConocido__pc'>
                    </lightning-input-field>
                    <lightning-input-field
                            variant="label-stacked"
                            field-name='PersonBirthdate'>
                    </lightning-input-field>
                    <lightning-input-field
                            variant="label-stacked"
                            field-name='Genero__pc'>
                    </lightning-input-field>
                </div>

            </div>
            <lightning-button data-id="submit-account-btn" type="submit" class="slds-hidden"></lightning-button>
        </lightning-record-edit-form>

With this output where only std person account fields are shown:

enter image description here

5
  • 1
    All your custom fields are Contact fields. If you do object-api-name="Contact", replace the "__pc" by "__c" and provide a Contact ID, do you see the fields? Have you tried a custom Account field (with "__c")? (You don't use import ... @salesforce/schema/Account..._pc originally, do you? These imports do not seem to work for Personal Accounts on the Account object.) Commented Mar 8 at 15:14
  • 1
    Have you checked the Working with Person Accounts section in the lightning-record-edit-form documentation? Commented Mar 12 at 10:30
  • Make sure that the field you are using in the lightning-record-edit-form is available on the page layout of the person account record type. Commented Mar 12 at 10:54
  • Person Accounts typically require a specific record type ,so I would make sure that is included in the form definition Commented Mar 12 at 13:01
  • __pc -> Custom Persona Account Field, source: apexhours.com/suffixes-in-salesforce Commented Mar 12 at 14:47

1 Answer 1

0

All the fields that aren't showing are custom, so have you set the view/edit permission for each one?

The fields will inherit the access configuration to display on the screen

You must log in to answer this question.

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