Personalized Community is here!
Quickly customize your community to find the content you seek.
Check out the latest Sales updates!Learn about the key capabilities and features of Dynamics 365 Sales and experience some of the new features.
Download overview guide | Watch Sales video
2022 Release Wave 1 PlanDynamics 365 release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.
2022 release wave 1 plan
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Community | FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
The actual scenario is I have an entity for data mapping with an account, we had given the privilege to the user to create a new attribute
depends upon the data they are importing
as well I have two fields in the account if the two filed contains data I want to make read-only for all the attributes are related data mapping entity.
Since you have mapped some fields between your custom entity and account, you should know which fieds are mapped.
And there should be a relationship between custom entity and account.
So we chould resolve this requirement in this way.
1.Check if the two fields contain data when onloading the account form.
As you konw using "formContext.data.entity.attributes.get()" will get all the fields on the form, and if you want to get a special field's value, you could use the following code.
We could use "find" method to find the special field we need with its field name.
But there is a better way to get the field on the form, using "formContext.getAttribute()" could get the field directly and this method could also imporve the peformance cause it doesn't need to get all the fields on the form.
2.Get the mapped field value in custom entity by web api.
For example, if custom data entity has an 1:N relationship with account, so there should be a custom entity lookup field on the account entity.
We could use the following code to get the related entity data by web api.
3.Compare the fields value and disable/enable the fields.
Hope it helps.
Thanks its worked I used web Api retrieve multiple I was comparing more than one
Business Applications communities