Hi,
I have a stringFormControl and FormReferenceGroupControl
and i'm trying to do the same things for both controls but I'm getting an error for the reference group
1. For caseCategory Y, I'm getting object reference error in the UI
FormStringControl caseCategoryX = sender.formRun().design().controlName(formControlStr(CaseDetailCreate, CaseCategoryX)) as FormStringControl; FormReferenceControl caseCategoryY = sender.formRun().design().controlName(FormReferenceControl(CaseDetailCreate, CaseCategoryY)) as FormReferenceControl;
2. text(null) not working for caseCategoryY
caseCategory2.text(null); caseCategory3.text(null);
1. My assumption is that you gave us wrong information and the exception doesn't get thrown at this line. I think you assign null to caseCategoryY and you'll get an exception later when you try to call a method on caseCategoryY variable. Is it so? If not, then please tell us which call throws the exception. Use the debugger if you haven't done it yet.
2. "Not working" isn't a good description of any problem. I'm assuming that you a compilation error telling you that FormReferenceControl class doesn't have any text() method. You can use value() method instead. Note that FormReferenceGroupControl isn't a text control - it expects a record ID.
André Arnaud de Cal...
291,969
Super User 2025 Season 1
Martin Dráb
230,842
Most Valuable Professional
nmaenpaa
101,156