Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Problem when running a RunBaseBatch class(in Client).

Posted on by Microsoft Employee

Good night, I'm having trouble running a RunBaseBatch class.
I created a calculation process to run in batch, the problem is that as a System Administrator it works well, however when the user is logged in the batch process is not running (also does not generate any Log). The difference in this development is that I create the batch within a class instead of executing via Client (Dialog). Is there any kind of privilege for the user to run this class or how to parameterize this batch always run as admin? Thanks!

  • nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: Problem when running a RunBaseBatch class(in Client).

    Why do you run it like that? Normally you should not set up any batches from x++ code unless you have some very special requirement.

    Could you share your requirement?

  • Suggested answer
    RE: Problem when running a RunBaseBatch class(in Client).

    Maybe this helps - docs.microsoft.com/.../walkthrough-extending-runbasebatch-class-to-create-and-run-a-batch

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Problem when running a RunBaseBatch class(in Client).

    Olá como vai você? dessa forma eu executo minha classe em lote!

    ----->

    ProcessBudgetPlanShared _processBudgetPlanShared; // Classe estende RunBaseBatch

               BatchHeader batHeader;

               BatchInfo batInfo;

               RunBaseBatch rbbTask;

               str sParmCaption = strFmt ("");

               ;

               rbbTask = novo ProcessBudgetPlanShared (_budgetPlanHeader, _sharedEvent);

               batInfo = rbbTask.batchInfo ();

               batInfo.parmCaption (sParmCaption);

               batInfo.parmGroupId (""); // O "Grupo de Lotes Vazios".

               batHeader = BatchHeader :: construct ();

               batHeader.addTask (rbbTask);

               batHeader.save ();

               info (strFmt ("'% 1' Executando emote.", sParmCaption));

  • Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: Problem when running a RunBaseBatch class(in Client).

    How exactly do you run it from code?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans