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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Parameter need to pass on data entity in d365fo

(2) ShareShare
ReportReport
Posted on by 30
Hi team,
 
I have a button in form. When we clicked this button it will be connected to an entity UCL_CustCustomerV3Entity and download the data project.
 
My requirement is before downloading the data project we like to do some filer on data.
 
For example - when user clicked on the button,then we should pass the refrence of active record from the form to the button and that reference also need to filter with the table on the data entity, so that when we will EXPORT the customer master we should get specific data only not all the data  in Excel.
 
For example -
 
Suppose in form we have five customers.
CU001,CU002,CU003,CU004,CU005
 
Suppose user select the customer CU004 in the form and clicked on the button then it should export the specific customer only not all customers.
 
How we can achieve this in d365fo.
 
Kindly let me know the approach pls.
 
Thanks!
Categories:
I have the same question (0)
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,447 Super User 2025 Season 2 on at
    Hi @@rp@n,
     
    I think you must add query to filter the data in your data entity.
     
    Bst regards,
    Mohamed Amine MAHMOUDI
  • @rp@n Profile Picture
    30 on at
    Thanks Mohamed.
     
    Kindly give me some reference pls. So, based on your reference, I will follow to replicate the same.
     
    Thanks in advance.
  • @rp@n Profile Picture
    30 on at
    In which method I need to write the query in data entity and how will I pass the active record on data entity to filter the data accordingly.
     
    Kindly provide me an example pls
  • Suggested answer
    Martin Dráb Profile Picture
    237,985 Most Valuable Professional on at
    If you use DMFEntityExporter.exportToFile() to export the data, the query can be set in queryData parameter.
  • @rp@n Profile Picture
    30 on at
    Thanks Martin for the response 
     
    Actually, my process should be manual not automate. I mean , till data project creation all thing will be manual while exploring the data.
     
    So, I need to write code for everything till data project creation for export the file in Excel when user clicked on the button for specific customer.
     
    The method you suggested, can I use for my requirement.
     
    Kindly confirm pls.
     
    Thanks!
  • Martin Dráb Profile Picture
    237,985 Most Valuable Professional on at
    Please tell me more about what happens when you click the button, ideally with screenshots.
     
    Originally, you said that when you "click on the button then it should export the specific customer", but now you seem to be suggesting that it should do something else then exporting the customer. I can't give you a solution without having the correct information about what you want, and your statement "till data project creation all thing will be manual" isn't detailed enough. Please invest five minutes to document your requirements and your current implementation.
  • @rp@n Profile Picture
    30 on at
    Sure Martin, I will post you with details soon. Thanks!
  • @rp@n Profile Picture
    30 on at
    hi Martin,
     
    This is form - Customer aging data storage
     
     
    I need to add a button for example - Download report
     
    So, here user will select the Batch name and clicked on the Download report.   
     
    The moment we clicked on the button , we need to pass batch name as a parameter to the data entity. So, that data entity will get filter based on the Batch name.
     
    Data entity - 
     
     
     
    I need to add few fields on this entity.   That I will do.
     
    So, we have table in entity - CustAgingDataStorage.  In this BatchName field is available.
     
    Note -
     
    So, the moment I select the Batch name in the form Customer Data Storage and Clicked on the button Download report:
     
    I expected to filter the record in the data entity CustomerAgingDataStorageEntity Based on the Batch name and it should give us the data project while exported. So, will download the excel only those data corresponding to the batch number.
     
    Till data project creation , it will be manual process does not automate. So, I need to write code in Class for till generate data project.
     
    Kindly advise me pls where and in which method need to write code for FILTER only.  So, that I will get the filtered data only in excel corresponding to Batch name.
     
    Thanks!
     
     
  • Martin Dráb Profile Picture
    237,985 Most Valuable Professional on at
    Please be concrete. What do you expect to see when you press the button?
     
    I thought you already have that done and you just don't know how to filter the data.
  • @rp@n Profile Picture
    30 on at
    Thanks Martin for the response.
     
    Yes I almost done manually to generate the data project but it's returning me all the batch name in Excel.
     
    I just like to know how will I pass the active record as a parameter to data entity from the form when we clicked on the button and filter the data on the entity.
     
    So, that I will get the filtered data corresponding to batch name in Excel after clicked on the button from the form
     
    Please let me know the approach.

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

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
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 420 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 241 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans