Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Unanswered

Filter Form Datasouce by OMOperatingUnit

(0) ShareShare
ReportReport
Posted on by 81

I have a form data source (OMOperatingUnit) on a form where I need to filter by "OMOperatingUnitType", but I am getting a null reference error. What is the proper way to filter this query?

public void executeQuery()
{
           
    this.query().dataSourceName("OmOperatingUnit").addRange(fieldNum(OmOperatingUnit, OMOperatingUnitType)).value(queryValue(OMOperatingUnitType::OMBusinessUnit));

    super();
}

  • GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: Filter Form Datasouce by OMOperatingUnit

    Hi Philly,

    Have you debugged the code?

    Is the error throwing on executeQuery method you have written?

    Also no need to mention the datasource name.

    OmOpearatingUnit_ds.queryBuilDatasource().addRange(FieldNum(Fields...)).value(ranges...);

    Thanks,

    Girish S.

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

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,074 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,900 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans