PL-400 · Question #91
You have the following code: You have a contact record that uses the GUID 2CFB1599-DEAD-425F-AB4A-76E6CAB51B09. You need to assign the contact record as the primary contact for an account when you…
The correct answer is B. Option B C. Option C. To assign a primary contact to an account during creation, two valid code segments would involve instantiating an Account entity and setting its primarycontactid attribute to an EntityReference pointing to the contact's GUID.
Question
Exhibits
Options
- AOption A
- BOption B
- COption C
- DOption D
How the community answered
(33 responses)- A9% (3)
- B70% (23)
- D21% (7)
Why each option
To assign a primary contact to an account during creation, two valid code segments would involve instantiating an `Account` entity and setting its `primarycontactid` attribute to an `EntityReference` pointing to the contact's GUID.
This option contains a code segment that does not correctly assign the primary contact or uses an invalid method/syntax for setting the `primarycontactid` lookup field on the `Account` entity.
This option provides a valid code segment that correctly assigns the specified contact GUID to the `primarycontactid` lookup field of the `Account` entity, establishing the primary contact relationship during account creation.
This option also provides a valid code segment that correctly assigns the specified contact GUID to the `primarycontactid` lookup field of the `Account` entity, using an alternative but equally valid method for setting the `EntityReference`.
This option contains a code segment that does not correctly assign the primary contact or uses an invalid method/syntax for setting the `primarycontactid` lookup field on the `Account` entity.
Concept tested: Dynamics 365 SDK account primary contact assignment
Source: https://learn.microsoft.com/en-us/power-apps/developer/data-platform/org-service/entity-references
Community Discussion
No community discussion yet for this question.

