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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

SysOperationServiceController dialog caption

(0) ShareShare
ReportReport
Posted on by

Hi all,

I've case whereby created a batch using SysOperationFramework, and typically we created Controller class with New method, something like this :`

 

public void new()

{

super();

this.parmClassName(classStr(MyServiceClass));

this.parmMethodName(methodStr(MyServiceClass, processOperation));

this.parmDialogCaption("My dialog batch job");

}

That word "My dialog batch job" is actually new, which is the one I want to show instead the old caption. The problem is I don't why it keep showing my old caption instead this one.

So regarding the issue, I've seen some of topic described here long time ago ->

https://community.dynamics.com/ax/f/microsoft-dynamics-ax-forum/144652/sysoperationservicecontroller-dialog-caption

Got one tips to move it to method Main() instead which I did, but the problem persist. Any idea how to solve this ?

Thanks in advance,

I have the same question (0)
  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    You can try to clear your usage data.

    Do you want to change the caption permanently, or only for some specific use cases?

  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi WWwong,

    Also, double-check that caption method is not overrided directly on your contoller class.

  • Suggested answer
    Pete Alberts Profile Picture
    3,542 on at

    Override the parmDialogCaption method.

    What I am quite sure is happening - You set the dialog caption variable, but the variable is set again (probably more than once) by the base classes. This can be the old value (as mentioned - usage data) or the label on the menu item.

    In my opinion it is also better practice to rather override the method.

  • WillWU Profile Picture
    22,361 on at

    Hi Wwong,

    What's the code in your main() method?

    You just should call

    "controller.parmDialogCaption("Change default caption");"

    after  setting your class and method.

    public static void main(Args _args)
    {
        DataController dataController;
    
        dataController = new DataController(className,methodName,executionMode);
    
        dataController.parmDialogCaption("Your Caption");
        dataController.startOperation();
    }

  • Community Member Profile Picture
    on at

    Hi all,

    I'm not sure any class/method override it. It just first in New method, now I moved it in Main method. And also I didn't use variable, it is fixed / permanent string.

    Here it is the only code :

    public void new()

       {

           super();

           this.parmClassName(classStr(MyServiceClass));

           this.parmMethodName(methodStr(MyServiceClass, processOperation));

           //this.parmDialogCaption("My dialog caption");

       }

       public ClassDescription caption()

       {

           return "My class caption";

       }

       public static void main(Args args)

       {

           MyControllerClass        MyControllerClass ;

           MyControllerClass = new MyControllerClass ();

           MyControllerClass .parmDialogCaption("My Dialog caption");

           MyControllerClass .startOperation();

       }

    The red font is obviously the old statement which I remark it already.

    One thing which different with Wu's Main class is I didn't put any parameter in the controller class declaration.

    In its Service class, I go straight to ProcessOperation method and in UIBuilder class I only "play" for override Dialog Field, not the caption.

    Btw, how to clear usage data now days? and I can still choose what I want to clear, right?

    Thanks,

  • Verified answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    Usage data can be cleared on the user Settings form, which can be opened from the setup/cogwheel icon in the top right corner. You can choose which usage data you want to erase, just like in AX.

  • Suggested answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    Hi WWwong,

    Try to remove method caption from your implementation, most likely it hides parent implementation which using the value from parmDialogCaption.

    public ClassDescription caption()
    {
    
       return "My class caption";
    
    }

  • Suggested answer
    Pete Alberts Profile Picture
    3,542 on at

    You have overridden the wrong method. Override parmDialogCaption, not classDescription.

    And then I don't think you need a controller in the first place. Create an action menu item and fill in the properties. You need the following:

    1. Label & help
    2. Class name is SysOperationServiceController
    3. Parameters should be YourOperationClass.yourEntryMethod
    4. Enum Type parameter should be SysOperationExecutionMode
    5. Enum parameter should be the SysOperationExecutionMode you desire
  • Community Member Profile Picture
    on at

    Hello all,

    Manage to resolve this. It is about Usage data, resolve by clear it.

    thanks all for the kind help.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 503 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 434 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans