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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Pass argument to custom form through sysoperation controller.

(0) ShareShare
ReportReport
Posted on by 35

Hello,

I have a requirement as given below.

Requirement: Create new batch that can be run from production order list page. This should be multi seleted. When the button is clicked it should open form and display selected records to edit few field values if required.

Batch is created using sysoperation framework. New custom form is created with simple grid in it. Able to open form through templateForm() of controller class.

Issue: When the button is clicked, it is showing all the production orders. I have added the code to filter the data in form method, which works if form is opened directly without sysoperation framework. When sysopration framework is used the form is not getting element object or any argument and showing all the production orders.

Question: How to pass the argument from controller class to this new form? So that this can be used to filter the records.

Thanks in advance!

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

    In short, SysOperation framework uses data contract classes to pass parameters.

  • Pooja Rawat Profile Picture
    35 on at

    Ok. How can i pass selected records as a parameter in contract class? And how to use that parameter to other form to display records?

  • Martin Dráb Profile Picture
    239,592 Most Valuable Professional on at

    These are several different questions.

    First of all, how can use you store a collection of values in a data contract class? You can use List class as a data member. Don't forget to specify the type of data in the collection with AifCollectionTypeAttribute. See LedgerFiscalCloseServiceJobContract.parmSelectedLedgerOptions() for example.

    Then, how you can get values from all records? Use MultiSelectionHelper class to iterate selected records, put them to a List and pass this list to your data contract?

    How you can get a data contract in the SysOperation dialog? Call this.controller().getDataContractObject(), for example. If you have no controller() method, it means that you haven't implemented the form correctly.

    By the way, note that I don't understand your goal so I can't say whether your design as such is correct.

  • Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at

    Requirement is you have production order list page where you have a button capable.of multi select. When you select few records and click the button, new form will open with these records and should be able to edit.

    Please correct me if I am wrong above. Now can you tell me what is the use of sys operation here? Or what you want to do with those records in the new form? And if you edit there in the new form, changes should be shown in the std list page as well right?

  • Pooja Rawat Profile Picture
    35 on at

    Thanks Martin! I will try to go through LedgerFiscalCloseServiceJobContract and understand the process.

    My goal is to display multiselected records to custom form which is opened through sysoperation.

    Scenario:

    Assume a standard production order form.

    I have given custom button (User can selected multiple records here) to this form e.x. 'Process selected order'. This button is nothing but the batch process handled through sysopration. So the standard dialog of batch processing appears and user is able to click 'Ok' and proceed.

    Now, e.x. user want to update qty field value of the selected records, before clicking 'Ok' button of the batch dialog.

    Now, I have created one new form 'Form1' with grid. In the controller class - templateForm() overridden to return 'Form1'. So that Form1 will open (This is batch dialog where there is two tab- one for Form1 and another for 'run in the background'). Now, 'Form1' is displaying all the production orders in the grid. It should only display selected orders.

    For this I tried to fetch args records() but it is blank in the 'Form1' init().

    Given below is my batch dialog example. Overview tab is displaying order. This tab is nothing but the 'Form1' (achieved through templateForm()). Another tab shows standard batch option Run in background tab. 

    Issue, overview tab should display selected records from the list page of all production order.

    pastedimage1681752486693v1.png

  • Pooja Rawat Profile Picture
    35 on at

    Yes. it's correct. Why sysoperation?  because it is one of the batch processing customization. What i want to do with the records in the new form? Now user want to edit few field values before processing it to batch. Because it is multiselect, so they want to show selected records to form and then edit.  If edited values needs to be shown on the standard list page? Yes, once it is edited and processed through batch, whatever the updated values is to be shown.

    For more detail please check my another comment, where it is explained in details.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 677 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 620

#3
Subra Profile Picture

Subra 483

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans