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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Custom Workflow to read Multiple Lines of text field

(0) ShareShare
ReportReport
Posted on by 1,703

CRM 2016

I have a custom entity that i import various XML file data into.  I need to write a workflow to deal with he data, however I need to read the xml data to determine if certain keywords are there,  I suppose a simple function would be the best way, but how to read that xml data and  return the  position or just a Boolean / Bit

can anyone make any suggestion for me to look at ?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    I believe XmlDocument is the way to go - stackoverflow.com/.../read-a-xml-from-a-string-and-get-some-fields-problems-reading-xml

  • Pete_N Profile Picture
    1,703 on at

    Hey Andrew,

    Thanks for that though to be fair .. I'm still a little confused. Each of the xml files we receive has a value in the encoding which determines which type of file it is and thus I know what processing to perform.

    i was hoping that there would be a simple solution  to just call the field up and search for the value ie

    line in xml data

    ?xml version="1.0" encoding="ISO-8859-1"?

    could a 'query by attribute'  with the 'add range value' being for instance 'ISO-8859' would that work being only a partial value within the attribute ?

  • Suggested answer
    imayur Profile Picture
    630 on at

    Hi,

    You can use XDocument in custom workflow activity for XML manipulations. Linq queries can be applied on Xdocument to get the desired XML nodes to retrieve or manipulate it.

    Here are some examples of Xdocument manipulations

    Convert valid xml string  to Xdocument

    XDocument xDoc = XDocument.Parse(xml);

    Find and Assign new Value

    xDoc.Descendants("parenttag").Elements("childtag").Single().SetAttributeValue("Value", "22")

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans