web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

How to deal with formReferenceControl?

(0) ShareShare
ReportReport
Posted on by 1,552

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);



I have the same question (0)
  • Martin Dráb Profile Picture
    238,308 Most Valuable Professional on at

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 843 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 417 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 325 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans