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)
Suggested Answer

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Sanhthosh.Kumar.K Profile Picture

Sanhthosh.Kumar.K 2

#2
Raed Salah Bzour Profile Picture

Raed Salah Bzour 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans