Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How to add optional association or a 0 to many association in FDM

Avatar

Avatar
Give Back
Level 1
rsadhenetibalai
Level 1

Likes

0 likes

Total Posts

9 posts

Correct Reply

1 solution
Top badges earned
Give Back
Ignite 1
Validate 1
Affirm 1
View profile

Avatar
Give Back
Level 1
rsadhenetibalai
Level 1

Likes

0 likes

Total Posts

9 posts

Correct Reply

1 solution
Top badges earned
Give Back
Ignite 1
Validate 1
Affirm 1
View profile
rsadhenetibalai
Level 1

14-08-2019

Hi all,

I am currently working on a form data model which is using Microsoft CRM as a data source.

I am trying to define an association between 2 entities, however, the only options available in the editor are a One to One association and a One to Many association.

I am able to define a One to One association, however, it throws an error if the value for the NavigationProperty is unavailable.

A short summary of my current scenario below,

In CRM, I have an entity let's say A, which contains a field (assume field_A) which is a lookup to another entity B.

But the field (field_A) is not a mandatory field in CRM, hence, it might not hold a reference to B always.

However, whenever it does contain a value, I want to retrieve its corresponding details from entity B.

If I define a One to One association in AEM FDM, it throws a null pointer exception when the record doesn't contain a reference and doesn't return data for the entire data model instead of just not returning the corresponding data for that association. But if the reference is available, then it returns the data correctly. I even tried to remove the Mandatory option for the navigation property and test it, however, there is no change in the behaviour.

Tracing the logs, I noticed that the association is being executed regardless of the availability of the data, which throws an exception. Is there a way to configure the FDM in such a way that the association call is only triggered if there is a value available for the binding property?

Replies

Avatar

Avatar
Validate 1
Level 10
Mayank_Gandhi
Level 10

Likes

285 likes

Total Posts

1,108 posts

Correct Reply

182 solutions
Top badges earned
Validate 1
Contributor 2
Ignite 5
Ignite 3
Ignite 10
View profile

Avatar
Validate 1
Level 10
Mayank_Gandhi
Level 10

Likes

285 likes

Total Posts

1,108 posts

Correct Reply

182 solutions
Top badges earned
Validate 1
Contributor 2
Ignite 5
Ignite 3
Ignite 10
View profile
Mayank_Gandhi
Level 10

14-08-2019

I think this is something on expected lines, can the CRM not return a default value like NA when the data is unavailable?

Avatar

Avatar
Give Back
Level 1
rsadhenetibalai
Level 1

Likes

0 likes

Total Posts

9 posts

Correct Reply

1 solution
Top badges earned
Give Back
Ignite 1
Validate 1
Affirm 1
View profile

Avatar
Give Back
Level 1
rsadhenetibalai
Level 1

Likes

0 likes

Total Posts

9 posts

Correct Reply

1 solution
Top badges earned
Give Back
Ignite 1
Validate 1
Affirm 1
View profile
rsadhenetibalai
Level 1

14-08-2019

Unfortunately, that is not an option within CRM without changing the system behaviour itself. At least, that is what our CRM specialists say. Is there an option to customize the behaviour of the OOB FDM?

Avatar

Avatar
Validate 1
Level 10
Mayank_Gandhi
Level 10

Likes

285 likes

Total Posts

1,108 posts

Correct Reply

182 solutions
Top badges earned
Validate 1
Contributor 2
Ignite 5
Ignite 3
Ignite 10
View profile

Avatar
Validate 1
Level 10
Mayank_Gandhi
Level 10

Likes

285 likes

Total Posts

1,108 posts

Correct Reply

182 solutions
Top badges earned
Validate 1
Contributor 2
Ignite 5
Ignite 3
Ignite 10
View profile
Mayank_Gandhi
Level 10

26-08-2019

Hi Rakesh,

I think you have logged a ticket for this as well. Can you confirm the ticket no,?

Avatar

Avatar
Give Back
Level 1
rsadhenetibalai
Level 1

Likes

0 likes

Total Posts

9 posts

Correct Reply

1 solution
Top badges earned
Give Back
Ignite 1
Validate 1
Affirm 1
View profile

Avatar
Give Back
Level 1
rsadhenetibalai
Level 1

Likes

0 likes

Total Posts

9 posts

Correct Reply

1 solution
Top badges earned
Give Back
Ignite 1
Validate 1
Affirm 1
View profile
rsadhenetibalai
Level 1

26-08-2019

Hi Mayank,

Ticket ID is 189521