Salesforce Fact #969 | LWC GraphQL mutation with address field

While creating records with address field using GraphQL mutation feature, we need to specify each of the constituting field values of the address. For country and state, the statecode and countrycode counterparts won't work.

Example error: contains a field not in 'ContactCreateRepresentation': 'MailingCountryCode'

And while fetching the data, we need to specify the constituent fields as the compound field won't work.

Example error: Validation error (FieldUndefined@[uiapi/ContactCreate/Record/MailingAddress/value]) : Field 'value' in type 'Contact_MailingAddress_CompoundField' is undefined

Attached is the screenshot of the correct syntax.



Comments

Popular posts from this blog

Salesforce Fact #913 | Access selected record field values in screen flow lookup w/o Get Records