web
You’re offline. This is a read only version of the page.
close
Skip to main content
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
    RE: Custom Workflow to read Multiple Lines of text field

    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
    RE: Custom Workflow to read Multiple Lines of text field

    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
    RE: Custom Workflow to read Multiple Lines of text field

    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

Responsible AI policies

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

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans