Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV forum
Answered

Altering the source expression on a request page field

Posted on by Microsoft Employee

Hey all, 

I'm working on a custom report has a request page. 

On the request page I enter Order No. the next field below it on the request page is Contact No.

When I enter the Order No. the contact number defaults. How can I control that default?

For example: Order No. 3 has the location-contact: Rob contact ID 01 and the owner-contact: Zach contact ID 02.

I run the report and enter in order 3 on the request page, the field below it auto populates Zach contact ID 02 the owner-contact. My goal is to enter the order number on the first field and have the location-contact Rob show up. 

The report is built on a single dataItem Contact. In order to distinguish owner-contact from location-contact I'll need to use the Customer table. 

Looking at the properties of the request page field that i'd like to auto populate:

SourceExpre = VAR_ContactFilter
TableRelation: Contact.No.

Could I join Contact (the reports dataitem) to Customer on the tableRelation property of a Request Page?

What are other options for automating a fields value?

I'd be happy to explain further. Thanks so much.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Altering the source expression on a request page field

    Ah , thank you.

    To be clear, I need to create a Global Variable something like VAR_DesiredContact and define that variable within the C/AL code assigning it the contact I want.

    Then I set it as the sourceExpression variable for that field on the request page?

    I'm looking for an existing variable that behaves like that to use as a template now.

  • Verified answer
    Mohana Yadav Profile Picture
    Mohana Yadav 50,260 Super User on at
    RE: Altering the source expression on a request page field

    you need to create a variable in report and calculate the contact from order and assign the value to variable.

    set variable in contact sourceexpression instead of contact.no

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,696 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,490 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans