Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8626091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:56:28+00:00 2026-06-12T07:56:28+00:00

I am inserting field values in Sitecore using Sitecore web service. If my field

  • 0

I am inserting field values in Sitecore using Sitecore web service. If my field is a Single-Line text then it is inserting fine. But when it is a Multilist type there is no insertion.
Here is the code where I am adding the items:

 private static void GetCountries(DataRow reader, XmlElement myNode)
    {
        myNode.RemoveChild(myNode.LastChild);
        foreach (DataRow wireRow in reader.GetChildRows("Countries"))
        {
            var newNode = myNode.OwnerDocument.CreateElement("Value");
            newNode.InnerText = wireRow["COUNTRY_NAME"].ToString();
            myNode.AppendChild(newNode);
        }
    }

After this call, myNode for that field looks like this:

<field itemid="{2C16342E-7662-432B-9895-5EDB15914D7F}" language="en" version="1" 
fieldid="{1F5956D6-EABE-4F74-A248-B25B7EE90350}" name="Categories" title=""
type="Multilist" source="/sitecore/content/data/Countries" section="Content" 
tooltip=""><value>US</value><value>China</value><value>India</value></field>

After this I am calling save:

 var okay = sitecoreService.Save(getItem.OuterXml, database, myCred);

But I dont see the countries in the Multilist field. What is going on here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T07:56:30+00:00Added an answer on June 12, 2026 at 7:56 am

    Multilist fields take strings of pipe-delimited GUIDs, so to add the countries into this field you will need to look up the Sitecore ID for each Country item and then concatenate those with a pipe.

    <value>{US-GUID}|{China-GUID}|{India-GUID}</value>

    The Sitecore web service is not a recommended way to perform these operations. Is there a specific reason you are using the web service and not the regular API (which would make these calls much easier) ?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using a form I am inserting the information from 3 text fields and 2
I have a question about inserting values into an input field from my MYSQL
I need to change a text field every time values in an array is
In my SQL database there're many fields like this: Field Type:Text Null:Yes Default:NULL My
I'm using a bit(1) field to store boolean values and writing into the table
How to increment a field in MySql using ON DUPLICATE KEY UPDATE when inserting
I'm injecting some jQuery to make the Alt Text field required in WordPress upload
After inserting new html to DOM,I need to add some listeners to it. But
When inserting a row in mysql database, string values need to be enclosed in
Inserting multilingual data into a SQL 2008 database (nvarchar field) I notice that it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.