Notifications
Announcements
No record found.
Hello,
I'm building a process to post some journals through batch processing (sysoperationframewrk).
I can't see how can I include "Records to include" option.
I want to have it for WMSJournalTable table.
Do we do it in Contract class?
Hi Johnny,
Yes, it's done in Contract class via DataMember and AifQueryTypeAttribute attribute.
www.artofcreation.be/.../
Hi Sergei,
I created a AOT Query of WMSJournalTable and did the steps connected to AifQueryTypeAttribute parm method. Still, when I run menu item, I do not see Records to include tab
Could you, please, share your contract and service method signature? Have you tried to reset usage data for user also?
sorry, I had wrong attribute for the parm method. Now I can see the "Records to include".
One more question:
If I have the Action menu item which calls my controller / service / contract classes on the Journal form and I have selected multiple Journals. Is it possible that these selected Journals go to "Records to include" query when I click on the action menu item button?
For example I have Journal1, Journal2, Journal3 selected from Item Arrival. I click this new button (which allows multiple selection) and I want the "Records to include" to be filtered by Journal1, Journal2, Journal3 automatically.
In the controller's main method you will need to catch your datasource caller from the args parameters, once you have the datasource, you can use the MultiSelectionHelper object to capture the records selected and modify the contract's query, you can do it because the controller can returns the contract object using the method getDataContractObject
Hi,
As it was mentioned already you can get a contract in the controller via getDataContractObject, apply ranges to query, and set query back to contract and it should be done before startOperation method.
Note, that getDataContractObject requires the name of the contract as a parameter and it's parameter name of contract from service method.
protected void initContract(Args _args) { MyContract contract; Query q; ; contract = this.getDataContractObject('_contract'); //Note that it's name of contract variable in service method q = contract.getQuert(); MultiSelectionHelper multiSelectionHelper; multiSelectionHelper = MultiSelectionHelper::createFromCaller(_args.caller()); multiSelectionHelper.createQueryRanges(q.dataSourceTable(tableNum(MyTable)), fieldStr(MyTable, JournalId)); qbr = findOrCreateRange_W(q.dataSourceTable(tableNum(MyTable)), fieldNum(MyTable, JournalId)); contract.setQuery(q); }
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 503 Most Valuable Professional
André Arnaud de Cal... 434 Super User 2025 Season 2
BillurSamdancioglu 278 Most Valuable Professional