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, ...
Answered

Run Batch in Sysoperation framework with data contract parameter

(1) ShareShare
ReportReport
Posted on by 672
HI Folks,
 
I have a custom service class which will be Scheduled in a batch through SysOperation framework.
 
I have created a Request contract class which is getting parameters in API but this contract class is getting null when the batch is running through code.
How can I use this contract class buffer again when the batch job is executing. 
 
new method of controller class - 
 public void new(abcRequestContract _requestContract)
    {
        abcRequestContract   requestContract;

        super();

        this.parmClassName(classStr(abcIntegrationHelper));
        this.parmMethodName(methodStr(abcIntegrationHelper, process));
        this.parmShowDialog(false);
        this.parmLoadFromSysLastValue(false);     
        this.batchInfo().parmBatchExecute(NoYes::Yes);
        this.parmExecutionMode(SysOperationExecutionMode::ScheduledBatch);

        abcRequestContract = this.getDataContractObject() as abcRequestContract;
        abcRequestContract.parmLegalEntity(_requestContract.parmxyz()); 
        this.startOperation();
    }
 
 
Thanks in advance!!
 
 
  • Martin Dráb Profile Picture
    241,637 Most Valuable Professional on at
    This looks like a duplicate of your discussion in How to initialize a batch in Custom service. Which of these two threads do you want to use? Discussing it twice in parallel would be a waste of time.
     
    Regarding your code in this thread, start by checking whether _requestContract.parmxyz() returns a value, or simply use a hard-coded value for now.
  • D365FO Avatar Profile Picture
    672 on at
    Sure Martin, we can continue in the previous thread only.
  • Verified answer
    D365FO Avatar Profile Picture
    672 on at

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 284 Super User 2026 Season 2

#2
Aayush Tiwari Profile Picture

Aayush Tiwari 213

#3
Subra Profile Picture

Subra 200 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans