I am trying to define a relationship between the Location object and other objects I've built to show things like where employees work or where something is located. Previously I had a separate table for Locations but would like to utilize the existing Locations object so that I can use hierarchical views and the built in security around LDF. When I try to create a new relationship from an object to the Location table, the Location object does not show up in the relationship list. If go to add the relationship from the Location object to the other object, I can add it. However, the selection page doesn't work so that when I click the magnifying glass on the custom object I get a page error. The relationship works from a one-sided view but I really need the user to be able to select the location record from the other object records to identify the location of the record.
I'll see what I can do
I just added the "Organization" attribute to an object and the LDF fields were added automatically but the relationship that was created doesn't seem to be reportable or show up in charts. However, the popup to select the location now works.
So, this gets me most of the way to where I need to go but now I just need to be able to report on and chart the relationships established between objects and the LDF fields. Hopefully this is an easier nut to crack than the issue described previously as the relationship is there, it just needs to be exposed in charts and reports.
LDF are system attributes, they're not supposed to be used for regular relationships.
What's your business case?
The application is essentially "location" specific in that objects are identified by where they are located within geographic and organizational structures. Because of this, I actually need to be able to limit what people will see based on their LDF permissions (they can only see their own locations / departments) and I need to be able to have relationships to those locations and departments. LDF was actually what I needed but I also need to be able to report on the relationships identified there. Does that make sense? Is there a better way to do this?
So why don't you enable "Organization" attribute on all objects? That would be most natural way.
I added the Organization which established the relationship and security for LDF but LDF relationships are not available in reports or charts. Those are the only areas I would need exposed in reports and charts to make it work exactly how I need it to.
Can you attach some screen captures to refresh my memory? That would speed up the process.
You can use Location in Views and filter by selected Location(s). You can also use fields from related Location in reports etc.
However in some cases Locations are not treated as related objects. I should identify these cases and make them work. It would help if you could identify the most pressing business case.
Making relationships with Location will not help: it cannot be used for LDF permissions and will be very confusing.
Using LDF, I can control who can see what based on the LDF settings which is what I need to be able to do. The LDF definitions show on the source object and I can show a related record table on the Location object as well. See below:
So it looks like the relationship is established. Where I can't see the relationship is in the reporting in both tabular and HTML reports:
I suggest you report on Incident etc. Object and use Location as an attribute. You can group records by Location, filter etc. Also use Location's fields in templates.
Any Object may have LDF attribute and if we consider this as relationship there will be too many relationships on Location side.
Hi,
From the Location object create a custom relationship to another object say Business Functions. Set your hierarchy as needed.
In the Business Functions object, create an update field value trigger which will run on after create and update which will copy the current locationId value to the custom relationship R12345. This way you will still use the location tree selector and just mimic the value to the custom relationship field.
Then you can report on Location with Business Functions as the next layer.
Hope this helps,
Piscoso, Martin
Rollbase
Pavel: I think this will get me what I need with what is in the platform now, thanks for helping me with this. Martin's solution is a good alternative if I need the true relationship so thank you as well, Martin!