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 :
Microsoft Dynamics AX (Archived)

How to change WorkFlow Properties by x++ Code

(0) ShareShare
ReportReport
Posted on by

Hi All,

I have a requirement. Can some body let me know is it possible to write a job to change WorkFlow properties using (x++ code) / Job.

For current requirement ,I want to Copy the default language (EN-US) and create a new translation (company default language)? Preferably I would like to fill in the company number, language which should be translated and WF number and then the job should run.

Please let me know how could I do this ?

Regards,

Mania

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    It is unclear what property would you like to change from code, can you please try to explain it better and use screenshots as well? Do you mean translations of a workflow instruction?

    It is possible to export/copy workflows. By exporting the Workflow version, you could check what is in the XML file.

    community.dynamics.com/.../183017

    My guess is that since the workflow editor is a separate, sealed application within AX, your best bet is to edit the exported XML file directly.

  • Community Member Profile Picture
    on at

    Hi Vilmos,

    Thanks for you reply.

    Please find the attached screen shot :

    rt.png

    Now I want to write a job which will update / change Translate to : PL and will copy the source text to Translated text.

    Once it is possible to write a job then I would like to use the job for all the companies.

    Please advice

  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    I can see that \Classes\SysWorkflowConfigurationListPage\exportConfiguration is reaching out to an external DLL to do the export itself - like I said, it is a canned process.

    Have a look at the export functionality and the content of the XML file, that should be one way to manipulate workflow content, by changing the XML in a job and reimporting it with the import method in the same class as above.

    When I add a Test text for EN-GB language and export the workflow version, I can indeed see the value within the file:

    <language z:Id="505">EN-GB</language><tableId>4085</tableId><text z:Id="506">Test</text></messageText></MessageTextCollectionProperty>


  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    I have done an SQL Profiler trace to see what is happening in the database.

    You are lucky, I could find the table which contains the data you want to insert. Have a look at \Data dictionary\Tables\WorkflowMessageText, that is the one holding the translations. Workflow header translations are linked to the configurations of the WorkflowVersionTable (tableid 4085).

  • Community Member Profile Picture
    on at

    Thank you so so much Vilmos. I working on this .  Wil update you shortly.

    Thanks a lot once again

  • Vilmos Kintera Profile Picture
    46,149 on at

    No problem, make sure you tick the checkbox next to all posts to verify answers and resolve the thread.

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Sukrut Parab Profile Picture

Sukrut Parab 2 Moderator

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans