Alright, I understand delegation can be a problem, and I think I understand why.
My issue is understanding best practices to avoid delegation issues.
My current situation is I have a Company (Accounts in the CDM) table, which has related records in a Sites table, which has related records in a SiteAddress table.
I would use a tree control, but as we don't have the control, I decided to use tablists.
First tablist shows companies, then the company sites in another tablist, and finally the Site addresses in the last tablist. (on this I would take suggestions, I do like the appearance of handling it this way, but I'm not married to it.)
SiteAddresses will cause a delegation issue due to the number of records. Right now it's less than the limit but it won't stay that way.
This code works (less the delegation issue):
I tried using AsType, but it is nothing but issues that I just don't see the issue based on examples I've found. We have Bing chat which does an OK job suggesting things and I can generally sort through. That suggested using AsType.
So, I'm looking for suggestions on how to avoid delegation issues. I considered just creating a collection locally, but that seems like a bad idea, so I'd rather do it properly.
When I try to use AsType I get a plethora of errors that I'm just not understanding, I've never used AsType, but it looks pretty straightforward.
Here is that disaster formula I can't sort out:
I am working on this myself, but I am not optimistic.
Another question I have is around the GUID comparison. I've run into this one a couple of times (issues trying to compare GUIDs) and gotten through it, but not really clear why I even have the issues at all.
The field 'ParentID' is a text field in the table Sites that stores the GUID of the record in the table Accounts the Sites record relates to. In Accounts the field is 'Account' or 'AccountID' This is the Account table in the CDM.
On this issue am I doing this wrong? I get errors requiring me to convert both to text (my solution), which is why I have the delegation issue in the first place, I think. Am I correct that if I could just make the comparison GUID to GUID and NOT use TEXT I wouldn't have a delegation issue? Am I doing something wrong... why can't I just compare GUID to GUID? Should I be handling the relation some other way?
The datasets are small enough right now I can adjust the approach now if I am doing this wrong.

Report
All responses (
Answers (