0

I have a custom entity Stuff and it contains a lookup to Contact. I created a 1:N relation with the latter as primary and the former as related entity.

On the Contact's form I added a subgrid and I only wish to list the instances of Stuff that have the lookup pointing to the currently viewed Contact. However, when I choose Only Related Records, the custom entity isn't in the list (despite it being related via the 1:N relation).

So, I'm using All Record Types, instead, but that shows all the instances of Stuff and not, as I wish, only those that are related to the currently viewed member.

So, what's the best course of action here? Should I do something with the relation? Or build a custom filter in JavaScript? How can I make the Stuff related to Contact if it's at all possible?

The image below shows the available conditions for the related entities. I notice that none of them relates to Contact, though. Do I need to activate it somehow or am I approaching it from a totally wrong angle?

enter image description here

Konrad Viltersten
  • 36,151
  • 76
  • 250
  • 438
  • Sorry for the silly question, but are you not looking at the wrong entity? You want to place a grid, that contains the records for "Stuff" related to contact right? To do that you simply need to place the grid and use the relationship, if you need to change the view, you will need to go into the "Stuff" associated view and edit it. You can't say filter by relation because it's the default behavior. – Mauro De Biasio May 11 '15 at 23:14

1 Answers1

2

So to give you more detail, you add the grid on the form: (This is coming from the contact Form edit, after you press add subgrid)

enter image description here

you select there only related records, this are the stuff record i created:

enter image description here

As you can see only 3 of them has a lookup pointing to a valid contact, from there if you look at the grid, is showing only the related ones as you selected during the grid creation:

enter image description here

In any case i update the answer this is how the relationship is defined, and is a simple lookup created from the stuff entity:

enter image description here

Mauro De Biasio
  • 1,146
  • 6
  • 16
  • At any rate: +1 for the quality. This is what I **expected** but not what I **see** in my system. Let's see where I'm taking the wrong turn, here. You're placing the grid on *Contact* form, right? And you get *Stuff* as a related entity because it's listed in the picklist when you go *Only Related Records*. Perhaps I declared the relation incorrectly... Would you mind posting a fourth image, showing how you defined the relation? – Konrad Viltersten May 12 '15 at 06:39
  • And to reiterate - the problem is that when I set *Only Related Records*, I can't see the custom entity in the list! But I do have a realtion so I'm guessing it's improperly designed... – Konrad Viltersten May 12 '15 at 06:47
  • I will try to play around with the lookup properties. In any case the screen that you are showing is in a list view, not in the grid view configuration, that is confusing me, seems like you are trying to set the related entities in the wrong place. If you try to use the advanced find to retrieve the contacts that have at least one related "Stuff" is working? I didn't mention that what you saw is coming from a crm online. – Mauro De Biasio May 12 '15 at 07:10
  • Ok, i got where you get that screen, I appended the relationship, but is a simple lookup created from "Stuff". The only difference that i'm aware of in this relationship behavior is that 2013 rollup 1 doesn't support n:n relationship, but i can see that your version already supports it. Oh did you publish after creating the field? – Mauro De Biasio May 12 '15 at 07:26
  • 1
    Got it! Apparently, it was MS that is at blame here. On the server where my organization resides (Dublin hub) - if anybody published any customization during a certain time window yesterday, they got into those issues. Known problem. MS's working on it. So they say... – Konrad Viltersten May 12 '15 at 14:32