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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to Add Parameters to have different recurrences of a batch job

(0) ShareShare
ReportReport
Posted on by 499

Hi

I need to have parameters on recurrence form a batch job .

Business scenario: I want to send mail on invoice due dates to different level mentioned in my level parameters.

these selected levels should be available in run method of my class.

I have created a class with extending RunBaseBatch.

Please help me in best possible way to achieve my requirement .

Thanks 

*This post is locked for comments

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

    I'm sorry, but I don't understand what you mean.

    What levels are you talking about? What are the parameters? What's the part that you're unable to do and why?

    We can't help you with your problem if we don't know what the problem is.

  • In AX2012 in the InventOnHandItemListPage I need to be able to f Profile Picture
    499 on at

    Hi Drab

    Hi have levels for different set of recipients, to whom i want to send the emails based on invoice due date, i have created my own table for that , all the required information for the email body is residing in my customized table,for this i have written code in class run method of a class which extends RunBaseBatch.

    to this class i want a parameterized form to set the Escalation level (of recipients ) like L1,L2,L3 (L1 has some set of email ids, L2 has some set of email ids).

    i think i made you understand regarding levels

    for further explanation , please refer to standard

    EBLR/General ledger/Area page-> Periodic

    Process allocation Request.

    there we have parameters. in General Tab.

    and one more tab to set the Recurrence of the job.

    I need same type of Multiple forms to be created based on my escalation level of recipient set (I will create multiple menu items for that) , for each menu item creatd i want to set the recurrence,  Like Level1 should execute once in a day, Level 2 should occur once in a week)

    for this i have created dialogue method and new methods in my class but my class is not accepting new method code , hence my menu item is not opening any form.

    as in case of standard.

    EBLR/General ledger/Area page-> Periodic

    Process allocation Request. is opening a form to select parameters.

  • Martin Dráb Profile Picture
    240,171 Most Valuable Professional on at

    All right, so it seems that the actual problem is "my class is not accepting new method code". Can you please add some details?

  • In AX2012 in the InventOnHandItemListPage I need to be able to f Profile Picture
    499 on at

    I mean to say , i want to have the parameter values in my class run method, based on the parameter i want to change my query in run method , i am unable to retrieve parameter values assigned in form in my run method.

  • Martin Dráb Profile Picture
    240,171 Most Valuable Professional on at

    All right, so you're trying to pass parameters from a form to a RunBaseBatch class but you have something wrong there.

    First of all, how are you setting the parameters?

    And do you have packing and unpacking implemented correctly? Have you tested it? Note that you wouldn't have to worry about it if you used SysOperation framework instead of the old RunBaseBatch framework.

  • In AX2012 in the InventOnHandItemListPage I need to be able to f Profile Picture
    499 on at

    yes parameter passing is not happening from dialog form to RunbaseBatch also i went through many post about SysOperation framework , but now i have gone with old approach. yes according to me pack and unpack have been implemented correctly, but i am not sure like how to retrieve the parameters in run method.

  • Martin Dráb Profile Picture
    240,171 Most Valuable Professional on at

    You would simply refer to the variable name defined in class declaration.

    If it doesn't work, you either didn't set the value at all or you haven't implemented serialization correctly, as I mentioned in the previous reply. Unfortunately you didn't gave us any details about either of them, therefore I have nothing new to say. And don't forget that debugger can help you with debugging.

  • Suggested answer
    In AX2012 in the InventOnHandItemListPage I need to be able to f Profile Picture
    499 on at

    Yes Martin .

    It worked , i have not serialized correctly, thank you for your help, you were pointing very right to analyze my steps .

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

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans