Skip to main content

Notifications

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

Submit custom process as batch job

(0) ShareShare
ReportReport
Posted on by 6,603
Hello:
I have a task to write a custom process to take a list of selected (/checked/) PO's from the PO list page, then submit them for invoice generation and posting. Users can select 50 PO's or more so it's necessary for this process to be submitted as a batch job. My initial thought was to create a process based on SysOperation framework, tie it to a menu, add the menu as a button control on the PO list page. Not sure if this will work, but the other question I have is would I be able to send along the list of select PO's in the menu call? 
Yes, I realize there's an existing function to do this but we're not going to use it because our process requires a slight deviation.
  • bankk Profile Picture
    bankk 6,603 on at
    Submit custom process as batch job
    Hi Girish,
    Yes, agreed on how inefficient it would be to select all those records. As I understand, there's not a good way to filter for these records. The 50 count is an estimate at this point.
    Thanks.
  • bankk Profile Picture
    bankk 6,603 on at
    Submit custom process as batch job
    Hi Andre,
    Yes, the users will be selecting PO from the list page. 
    Once I have the PO's in the container, is the idea then to pass the container via the controller's args param? 
    Thank you.
  • bankk Profile Picture
    bankk 6,603 on at
    Submit custom process as batch job
    Hi Bharani, 
    That would be great if I can depend on a query and set of criteria. However, the request is the user select the PO records. 
  • GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    Submit custom process as batch job
    Hi Kbanh,
     
    How the user selects 50 lines from the grid? It will be difficult to select 50 lines from the grid manually.
    You can use MultiSelectHelper class to get the selected records from the grid and as Andre said you can insert into a container and pass it to the classes.
     
    Thanks,
    Girish S.
     
  • Verified answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,979 Super User 2025 Season 1 on at
    Submit custom process as batch job
    Hi KBanh,
     
    Are the users selecting the purchase orders by marking grid roles? If so, you can first store selected POs in a table or container variable and use this as input for the batch job. The standard application is also storing details what to post in PurchParm... tables. 
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    Bharani Preetham Pe... 3,587 Super User 2024 Season 1 on at
    Submit custom process as batch job
    I am not exactly sure you can directly create a button and all selected records can be sent through batch. My suggestion is to create a new menuitem and create a batch job with filter criteria, so that whatever purchase orders are selected, those can be invoiced and in a batch. This can be achieved by normal sys operation framework with filter criteria.

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…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

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

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,979 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,848 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans