Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Editing FormXML programmatically

Posted on by Microsoft Employee

Hey everyone,

I'm currently in the progress of creating a Dynamics CRM toolset for easing translation of customizations (You can find it here: https://github.com/DigitalFlow/Xrm-Easy-Translation).

There is already support for translating attributes and option set values, which also works great at this point.

Now I'm trying to add translations in forms as well and am already done retrieving the systemform record using the WebApi, adding translations in the FormXML and saving the updated systemform again.

The update request executes without errors, however only existing labels that I edited are being updated, new ones are not being added as they should.

My question is: Has anyone of you ever did something like this and knows the reason, why my update request containing the updated form does only update existing labels?

Kind Regards,

Florian

Edit: So, as it turns out, the labels are updated as I wanted in the CRM.

But when retrieving the updated FormXML, the CRM only returns the labels for the current UI language.

This is a quite unhandy design limitation unfortunately, even because the labels would contain the language code which they were intended for.

I might try switching through all user languages when retrieving the form and intersecting them...

*This post is locked for comments

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Editing FormXML programmatically

    Please have a look at my edit in the question, the CRM does only return the labels for the current language when retrieving the formXML unfortunately.

    Fortunately the labels are updated in a merged style, so imagine having language packs for 1031 and 1033 in your organization.

    When requesting the formXml, you will without intersecting multiple requests only get labels for your current language 1031 / 1033, even if both languages have labels for this form.

    Luckily, if you're on the 1033 UI and edit the label for 1033, only this label will be changed, other ones (for other LCIDs) will remain untouched, even if your updated formXml only contains the one label for your current language. If sending new values for 1031 and 1033, both updates will be processed.

    Each cell / section / tab has a labelId, so my guess is that this and the language code of the labels are their primary key.

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

Featured topics

Product updates

Dynamics 365 release plans