Update list item with managed metadata field returns The security validation for this page is invalid

Using SharePoint 2010 Server
I'm attempting to programtically update a managed metadata field in a document library. I'm able to do it without issue on all other non-managed metadata fields. When I attempt it on a MM field I get the error message
"The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again."
After some digging I realised that this error was being caused because SharePoint was trying to write to the TaxonomyHiddenList list (../sites/mysite/Lists/TaxonomyHiddenList/AllItems.aspx)
When I update a document through the browser with a term (Term01), it shows up in this TaxonomyHiddenList . I can then run my application, apply Term01 to my new document and it works fine. But if I apply Term02 to my new document it gives me the error above.
Summary
My app can read the TaxonomyHiddenList fine but it can not perform an operation that would write to it, resulting in not being able to update the MM field.
Question
Is there any advice on how I can further debug this issue?

Hi,
According to your post, my understanding is that you want to update managed metadata field in document library programmatically.
I have made a simple code demo below to updata managed metadata field in document library, it works like a charm, you can refer to it.
public static void UpdateMSField()
using (SPSite site = new SPSite("http://YourSiteURL"))
using (SPWeb web = site.OpenWeb())
//SPList list = web.Lists.TryGetList("Libs_1");
SPDocumentLibrary lib = (SPDocumentLibrary)web.Lists["Libs_1"];
// No point in proceeding if we can't find the list
if (lib != null)
// add a new item
// SPListItem item = list.AddItem();
SPListItem item = lib.GetItemById(1);
//Console.WriteLine(item.Name);
// get the current taxonomy session, which wraps up all of the
// associated TermStore objects for this SPSite object
TaxonomySession metadataService = new TaxonomySession(site);
// get the taxonomy field
TaxonomyField taxField = item.Fields["MMS_1"] as TaxonomyField;
// get the term store associated with the taxonomy field
TermStore termStore = metadataService.TermStores[taxField.SspId];
// get the actual term set associated with the taxonomy field
TermSet termSet = termStore.GetTermSet(taxField.TermSetId);
// search for the terms we wish to set the field to
var terms = termSet.GetTerms("term_1", true, StringMatchOption.ExactMatch, 1, false);
// if we have found a term populate the field
if (terms.Count > 0)
// set the field to the term(s) we have found
taxField.SetFieldValue(item, terms.First());
// Update the item
item.Update();
Console.WriteLine("success...");
More reference:
http://www.3guysonsharepoint.com/?p=1052
http://vineet-winit.blogspot.com/2013/04/how-to-update-managed-metadata-field-in.html
Thanks & Regards,
Jason
Jason Guo
TechNet Community Support

Similar Messages

  • SharePoint Error "The security validation for this page is invalid" when delete an item

    Hi,
    I have SharePoint 2010 setup and works fine until today all of a sudden it throws error "The security validation for this page is invalid" when delete a SharePoint document or list item.
    There is no custom event handler deployed on library/list, and it should not be account issue as the same account works yesterday, and even after I turn off security validation from Central Admin, it still doesn't work.
    The only change I did is turn off Dynamic Compression from IIS, after that I tried enable back Dynamic Compression but it still doesn't work.
    Does anyone know what could be the possible reasons? Thanks in advance.

    hi,
     in the page just try to make this :
    <SharePoint:FormDigest runat="server" />
    PrasadWT

  • Import List Items with Managed Metadata Field from CSV File

    Hello,
    I try to import list items from a CSV File. Most of the fields are populating correctly except the Managed Metadata Field. I found multiple examples on how to set Managed Metadata Fields with Powersehll, but unfortunately I couldnt get it running.
    The CSV File holds values for the Metadata Column, this value should be checked against the Metadata in the Termstore. If this Term is existent, then it should set the fields value, if it is not existant then it should add the term from the CSV File to the
    Term Set in the Term Store. Can anybody give me a tip on how to do this? This is what I have, where Line 4 holds the Metadata:
    $Siteurl = "http://siteUrl"
    $Rootweb = New-Object Microsoft.Sharepoint.Spsite($Siteurl);
    $Webapp = $Rootweb.Webapplication
    $listName = "Catalogue"
    $listWeb = Get-SPWeb $Siteurl
    $list = $listWeb.Lists[$listName]
    $pfad1 = "c:\temp\Servers.csv"
    $content = import-csv -Delimiter ";" -Path $pfad1 
    foreach ($line in $content) {
    $newItem = $list.Items.Add()
    $newItem["Field 1"] = $line.1
    $newItem["Field 2"] = $line.2
    $newItem["Field 3"] = $line.3
    $newItem["Field 4"] = $line.4
    $newItem.Update()
    write-host $line.Title imported
    Thanks!!

    Hi Jimmie,
    From your description, when importing list from csv to SharePoint site, you would like to compare if Managed Metadata column exists in term store, and return yes value, if not, add it to term store.
    That might need script to achieve. You need to import list at first, then get value from term store, and compare with the list. Change the list field per comparison result, then add new value to term store.
    However, there might some workaround to meet your requirement. Not surly understand, so I find some references for you:
    If you would like to export Term Set to CSV from SharePoint 2013, then you could compare it:
    http://gallery.technet.microsoft.com/office/PowerShell-for-SharePoint-a838b5d0#content
    If you would like to query SharePoint 2013 Managed metadata term store using JavaScript:
    http://sharepoint.stackexchange.com/questions/60045/query-sp2013-managed-metadata-term-store
    http://stackoverflow.com/questions/13858962/getting-all-the-term-stores-in-sharepoint-2010-web-services-or-client-side-obje
    If you would like to synchronize, import or copy term store & managed metadata in SharePoint between environments:
    http://www.matthewjbailey.com/synchronize-import-or-copy-term-stores-managed-metadata-in-sharepoint/
    Regards,
    Rebecca Tu
    TechNet Community Support

  • I am unable to access my email. I can sign in with my password, then a message comes up that says "The plug-in for this page has been disabled. Click here to manage your plug-ins." All plug-ins listed are enabled. What am I missing?

    I am unable to access my email from Charter.net. I can sign in with my password, then a message comes up which says "The plug-in for this page has been disabled. Click here to manage your plug-ins." All of my plug-ins are enabled. What am I missing?

    After a great deal of searching I ran across the suggestion to disable all plug-ins and then, one by one, enable them until finally the problem was solved. I am not sure which plug-in was causing the problem, as I am satisfied to have the problem solved. I am going to leave the rest of the plug-in disabled.

  • Update list item with multiple lookup

    I want to write a workflow to append project name (from list project) to a lookup column (mutiple value) in another list. I use update list item and put follwing string in multiple lookup column:
    [%CurrentItem:ID%];#[%Current Item: Project%]
    I find the lookup column will be replaced always with new project name. But I want to append the project name to existing vaule. How can I do that?

    thank you for the replying. I have just solved this issue. I save the string every time in a column and append the project name in the string column and put the whole string in mutiple lookup column. then the new value will be appended in lookup column. it
    seems like followings:
    1. time: ID1;#Project1
    2. time: ID1;#project1;#ID2;#project2
    3. time: ID1;#project1;ID2;#project2;#ID3;#project3

  • HT1918 When trying to update my billing information; it keeps telling me the security code I'm entering is invalid.  I know it's correct.  What's the problem?

    When trying to update my billing information to my new MasterCard, the system keeps telling me the security code I'm entering is invalid.  I know it's correct.  Why is it doing this?

    check your purchase history, see if there has been a problem with a previous purchase, if so, you might have to temporarilyuse another gift card or use itunes gift cards

  • Autofill in Google Toolbar does not appear to be working with Firefox 4 - Aways saying Autofill not available for this page even on pages I have used it before FF4 upgrade

    Autofill in Google Toolbar does not appear to be working with Firefox 4 - It aways gives the message "Autofill not available for this page". This is happening on pages I have used Autofill on before upgrading to FF4 from Firefox 3.5.x

    i did not see a solution posted - I tired what I read. Going back to an old version may solve the problem but it is a stupid solution so I have yet to do that.
    I am on version 4 and autofil this does not work :
    Popular answer Go to this answer
    Uninstall version 5, then Google "google toolbar version 4", follow the link to FileHippo.com, and download and install the last version 4. When you reinstall it, make sure you turn off the option to perform automatic updates.
    6 of 7 people found this answer helpful. Did you? Sign in to vote. Report abuse

  • Fire event receiver after update list items with PowerShell

    Hi,
    I have a list with a event receiver attached to it. Also I have a PowerShell script which updates some elements. I noticed that the Event Receiver is not firing after the PowerShell script runs. Is there any way to make it happen?
    Thanks anyway!

    Hi,
    According to your description, my understanding is that the event receiver not fire after you update the item elements.
    I suggest you can create a simple event receiver and then test if the event receiver fire after PowerShell run.
    Here is my PowerShell script:
    $spWeb = Get-SPWeb -Identity http://sp2013sps/sites/test
    $spList = $spWeb.Lists["Documents"]
    $spItem = $spList.GetItemById(14)
    $spItem["Title"] = "Test111"
    $spItem.Update()
    Here is my event receiver code:
    public override void ItemUpdated(SPItemEventProperties properties)
    base.ItemUpdated(properties);
    Console.WriteLine("event receiver has been done");
    After the PowerShell run, it will come out the result:
    It means the event receiver has been fired.
    Here is a detailed article for your reference:
    http://blogs.technet.com/b/speschka/archive/2009/12/25/debugging-event-receivers-in-sharepoint-2010.aspx
    Thanks
    Best Regards
    Jerry Guo
    TechNet Community Support

  • CQWP does not return result for a specific query when filtering on a managed metadata field.

    Hi,
    We are facing a serious production issue. We've search the web extensively but to no avail.
    Problem:
    CQWP does not return result for a specific query when filtering on a managed metadata field.
    ULS log:
    The Uls logs provides 3 different messages that I could relate to every time the query is executed. The last item(level Medium) is displayed 14 times. For readability I've moved the ULS logs to the bottom of this question.
    Query:
    The query is as follows:
    (I've translated this from dutch so pardon any typo's)
    Query: (top selection) Display items from all sites in the site collection
    ListType: Documentlibrary
    Contenttype:
    Items from this group:Custom Document Contenttypes
    Items from this content type: Verklaring
    Filter: Soort is equal to X
    extra info: the field soort (Type) is a managed metadata field that was assigned the value X
    Managed Metadata Structure:
    -managed metadata service
      -Contoso
        -Enterprise Taxonomy (term set)
          -Document (term)
            -Verklaring (term)
              -Soort (term)
                -x (term)
    EXTRA INFO:
    When I modify the filter to filter on Title the CQWP DOES return the correct document!
    When I modify the query settings to search a specific library the CWQP also does return the correct document! (In this case I am filtering on a managed metadata field).
    QUESTION:
    Why doesn't the CQWP return the document when filtering on a managed metadata field over the entire site collection.
    Why does the CQWP return the document when filtering on a managed metadata field over a single library.
    (The type of information the CQWP should return (Soort:x) is stored in a dozen document libraries!)
    Here are the ULS logs.
    Product: Web Content Management
    Category Publishing
    Level: Monitorable:
    CrossListQueryCache::GetSiteData() caught exception (Microsoft.SharePoint.SPException: Kan deze actie niet voltooien.  Probeer het opnieuw. ---> System.Runtime.InteropServices.COMException (0x80004005): Kan deze actie niet voltooien.  Probeer
    het opnieuw.     bij Microsoft.SharePoint.Library.SPRequestInternalClass.CrossListQuery(String bstrUrl, String bstrXmlWebs, String bstrXmlLists, String bstrXmlQuery, ISP2DSafeArrayWriter pCallback, Object& pvarColumns)    
    bij Microsoft.SharePoint.Library.SPRequest.CrossListQuery(String bstrUrl, String bstrXmlWebs, String bstrXmlLists, String bstrXmlQuery, ISP2DSafeArrayWriter pCallback, Object& pvarColumns)     --- Einde van intern uitzonderingsstackpad
    ---     bij Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx)     bij Microsoft.SharePoint.Library.SPRequest.CrossListQuery(String bstrUrl, String bstrXmlWebs, String bstrXmlLists, String bstrXmlQuery,
    ISP2DSafeArrayWriter pCallback, Object& pvarColumns)     bij Microsoft.SharePoint.SPWeb.GetSiteData(SPSiteDataQuery query)     bij Microsoft.SharePoint.Publishing.CachedArea.GetSiteData(SPWeb web, SPSiteDataQuery
    siteDataQuery, Boolean useSpQueryOnList)     bij Microsoft.SharePoint.Publishing.CachedArea.GetCrossListQueryResults(SPSiteDataQuery query, SPWeb currentContext, Boolean onlyPopulateCache, Boolean useSpQueryOnList, Int32 lcid)    
    bij Microsoft.SharePoint.Publishing.CrossListQueryCache.GetSiteDataResults(CachedArea cachedArea, SPWeb web, SPSiteDataQuery query, Boolean useSpQueryOnList)) for query:  '<ViewFields><FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}"
    Nullable="True" Type="Text"/><FieldRef ID="{94f89715-e097-4e8b-ba79-ea02aa8b7adb}" Nullable="True" Type="Lookup"/><FieldRef ID="{1d22ea11-1e32-424e-89ab-9fedbadb6ce1}" Nullable="True"
    Type="Counter"/><FieldRef ID="{28cf69c5-fa48-462a-b5cd-27b6f9d2bd5f}" Nullable="True" Type="DateTime"/><FieldRef ID="{1df5e554-ec7e-46a6-901d-d85a3881cb18}" Nullable="True" Type="User"/><FieldRef
    ID="{d31655d1-1d5b-4511-95a1-7a09e9b75bf2}" Nullable="True" Type="User"/><FieldRef ID="{8c06beca-0777-48f7-91c7-6da68bc07b69}" Nullable="True" Type="DateTime"/><FieldRef ID="{30bb605f-5bae-48fe-b4e3-1f81d9772af9}"
    Nullable="True" Type="Lookup"/><FieldRef ID="{ba3c27ee-4791-4867-8821-ff99000bac98}" Nullable="True" Type="Text"/><FieldRef ID="{c5c4b81c-f1d9-4b43-a6a2-090df32ebb68}" Nullable="True"
    Type="Lookup"/><FieldRef ID="{8fca95c0-9b7d-456f-8dae-b41ee2728b85}" Nullable="True" Type="Lookup"/><FieldRef ID="{39360f11-34cf-4356-9945-25c44e68dade}" Nullable="True" Type="Text"/><FieldRef
    ID="{543bc2cf-1f30-488e-8f25-6fe3b689d9ac}" Nullable="True" Type="Image"/><FieldRef ID="{43bdd51b-3c5b-4e78-90a8-fb2087f71e70}" Nullable="True" Type="Number"/><FieldRef ID="{9da97a8a-1da5-4a77-98d3-4bc10456e700}"
    Nullable="True" Type="Note"/><FieldRef ID="{aea3cd20-8da0-4cb7-803b-5a33079a0e4d}" Nullable="True" Type="Lookup"/><FieldRef Name="ScopeId" /><FieldRef Name="_Level" /><FieldRef
    Name="UniqueId" /><ListProperty Name="DraftVersionVisibility" /></ViewFields><Lists ServerTemplate="101"></Lists><Webs Scope="Recursive" /><RowLimit>45</RowLimit><Query><Where><And><BeginsWith><FieldRef
    Name="ContentTypeId" Nullable="True" Type="ContentTypeId"/><Value Type="ContentTypeId">0x010100C5FEE83B67FA6445B0C14AE8B7761BB8011E</Value></BeginsWith><In><FieldRef ID="{aea3cd20-8da0-4cb7-803b-5a33079a0e4d}"
    LookupId="TRUE"/><Values><Value Type="Counter">783</Value></Values></In></And></Where><OrderBy><FieldRef ID="{8c06beca-0777-48f7-91c7-6da68bc07b69}" Nullable="True"
    Type="DateTime" Ascending="FALSE"/></OrderBy></Query>' at url: /. Titel webonderdeel: Inhoudsquery
    Product: Web Content Management
    Category Publishing
    Level: Warning
    Error occured while processing a Content Query Web Part. Performing the following query '<ViewFields><FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Nullable="True" Type="Text"/><FieldRef ID="{94f89715-e097-4e8b-ba79-ea02aa8b7adb}"
    Nullable="True" Type="Lookup"/><FieldRef ID="{1d22ea11-1e32-424e-89ab-9fedbadb6ce1}" Nullable="True" Type="Counter"/><FieldRef ID="{28cf69c5-fa48-462a-b5cd-27b6f9d2bd5f}" Nullable="True"
    Type="DateTime"/><FieldRef ID="{1df5e554-ec7e-46a6-901d-d85a3881cb18}" Nullable="True" Type="User"/><FieldRef ID="{d31655d1-1d5b-4511-95a1-7a09e9b75bf2}" Nullable="True" Type="User"/><FieldRef
    ID="{8c06beca-0777-48f7-91c7-6da68bc07b69}" Nullable="True" Type="DateTime"/><FieldRef ID="{30bb605f-5bae-48fe-b4e3-1f81d9772af9}" Nullable="True" Type="Lookup"/><FieldRef ID="{ba3c27ee-4791-4867-8821-ff99000bac98}"
    Nullable="True" Type="Text"/><FieldRef ID="{c5c4b81c-f1d9-4b43-a6a2-090df32ebb68}" Nullable="True" Type="Lookup"/><FieldRef ID="{8fca95c0-9b7d-456f-8dae-b41ee2728b85}" Nullable="True"
    Type="Lookup"/><FieldRef ID="{39360f11-34cf-4356-9945-25c44e68dade}" Nullable="True" Type="Text"/><FieldRef ID="{543bc2cf-1f30-488e-8f25-6fe3b689d9ac}" Nullable="True" Type="Image"/><FieldRef
    ID="{43bdd51b-3c5b-4e78-90a8-fb2087f71e70}" Nullable="True" Type="Number"/><FieldRef ID="{9da97a8a-1da5-4a77-98d3-4bc10456e700}" Nullable="True" Type="Note"/><FieldRef ID="{aea3cd20-8da0-4cb7-803b-5a33079a0e4d}"
    Nullable="True" Type="Lookup"/><FieldRef Name="ScopeId" /><FieldRef Name="_Level" /><FieldRef Name="UniqueId" /><ListProperty Name="DraftVersionVisibility" /></ViewFields><Lists
    ServerTemplate="101"></Lists><Webs Scope="Recursive" /><RowLimit>45</RowLimit><Query><Where><And><BeginsWith><FieldRef Name="ContentTypeId" Nullable="True" Type="ContentTypeId"/><Value
    Type="ContentTypeId">0x010100C5FEE83B67FA6445B0C14AE8B7761BB8011E</Value></BeginsWith><In><FieldRef ID="{aea3cd20-8da0-4cb7-803b-5a33079a0e4d}" LookupId="TRUE"/><Values><Value Type="Counter">783</Value></Values></In></And></Where><OrderBy><FieldRef
    ID="{8c06beca-0777-48f7-91c7-6da68bc07b69}" Nullable="True" Type="DateTime" Ascending="FALSE"/></OrderBy></Query>' generated the following error: Kan deze actie niet voltooien.  Probeer het opnieuw.
    at the following url: /. Titel webonderdeel: Inhoudsquery
    Kan deze actie niet voltooien. Probeer het opnieuw. This is Dutch. It means something like: Cannot complete this action. Please try again.
    Product: Web Content Management
    Category Publishing
    Level: Medium (this message is displayed 14 times)
    ConsoleUtilies.GetContextualControlMode had no currentPage so the current SPWebPartManager mode cannot be retrieved.

    Hi,
    while digging through the logging (again) I found some extra logging regarding the same correlation id (see details below).
    We have a fairly large term store (4000+ lines).
    If somebody has a clue or tip that would greatly appreciated!
    03-19-2014 13:49:51.87 w3wp.exe (0x2098) 0x23BC SharePoint Foundation Database fa42 Monitorable A large block of literal text was sent to sql.  This can result in blocking in sql and excessive memory use on the front
    end.  Verify that no binary parameters are being passed as literals, and consider breaking up batches into smaller components.  If this request is for a SharePoint list or list item, you may be able to resolve this by reducing the number of fields. 1971313a-6baa-49e9-bace-d024ce67f25c
    03-19-2014 13:49:51.87 w3wp.exe (0x2098) 0x23BC SharePoint Foundation Database fa43 High Slow Query Duration: 127.1515 1971313a-6baa-49e9-bace-d024ce67f25c
    03-19-2014 13:49:51.87 w3wp.exe (0x2098) 0x23BC SharePoint Foundation Database fa44 High Slow Query StackTrace-Managed:    bij Microsoft.SharePoint.Utilities.SqlSession.OnPostExecuteCommand(SqlCommand command,
    SqlQueryData monitoringData)     bij Microsoft.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand command, CommandBehavior behavior, SqlQueryData monitoringData, Boolean retryForDeadLock)     bij Microsoft.SharePoint.SPSqlClient.ExecuteQueryInternal(Boolean
    retryfordeadlock)     bij Microsoft.SharePoint.SPSqlClient.ExecuteQuery(Boolean retryfordeadlock)     bij Microsoft.SharePoint.Library.SPRequestInternalClass.CrossListQuery(String bstrUrl, String bstrXmlWebs, String
    bstrXmlLists, String bstrXmlQuery, ISP2DSafeArrayWriter pCallback, Object& pvarColumns)     bij Microsoft.SharePoint.Library.SPRequest.CrossListQuery(String bstrUrl, String bstrXmlWebs, String bstrXmlLists, String bstrXmlQuery, ISP2DSafeArrayWriter
    pCallback, Object& pvarColumns)     bij Microsoft.SharePoint.SPWeb.GetSiteData(SPSiteDataQuery query)     bij Microsoft.SharePoint.Publishing.CachedArea.GetSiteData(SPWeb web, SPSiteDataQuery siteDataQuery, Boolean
    useSpQueryOnList)     bij Microsoft.SharePoint.Publishing.CachedArea.GetCrossListQueryResults(SPSiteDataQuery query, SPWeb currentContext, Boolean onlyPopulateCache, Boolean useSpQueryOnList, Int32 lcid)     bij Microsoft.SharePoint.Publishing.CrossListQueryCache.GetSiteDataResults(CachedArea
    cachedArea, SPWeb web, SPSiteDataQuery query, Boolean useSpQueryOnList)     bij Microsoft.SharePoint.Publishing.CrossListQueryCache.GetSiteDataResults(CachedArea ca, Boolean useSpQueryOnList)     bij Microsoft.SharePoint.Publishing.CrossListQueryCache.GetSiteDataResults(SPSite
    site, String webUrl, Boolean useSpQueryOnList)     bij Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart.IssueQuery()     bij Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart.GetXPathNavigator(String
    viewPath)     bij Microsoft.SharePoint.WebPartPages.DataFormWebPart.PrepareAndPerformTransform(Boolean bDeferExecuteTransform)     bij Microsoft.SharePoint.WebPartPages.DataFormWebPart.PerformSelect()    
    bij Microsoft.SharePoint.WebPartPages.DataFormWebPart.DataBind()     bij Microsoft.SharePoint.WebPartPages.DataFormWebPart.EnsureDataBound()     bij Microsoft.SharePoint.WebPartPages.DataFormWebPart.CreateChildControls()    
    bij System.Web.UI.Control.EnsureChildControls()     bij System.Web.UI.Control.PreRenderRecursiveInternal()     bij System.Web.UI.Control.PreRenderRecursiveInternal()     bij System.Web.UI.Control.PreRenderRecursiveInternal()    
    bij System.Web.UI.Control.PreRenderRecursiveInternal()     bij System.Web.UI.Control.PreRenderRecursiveInternal()     bij System.Web.UI.Control.PreRenderRecursiveInternal()     bij System.Web.UI.Page.ProcessRequestMain(Boolean
    includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     bij System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     bij System.Web.UI.Page.ProcessRequest()    
    bij System.Web.UI.Page.ProcessRequest(HttpContext context)     bij ASP.BLANKWEBPARTPAGE_ASPX_1653093133.ProcessRequest(HttpContext context)     bij Microsoft.SharePoint.Publishing.TemplateRedirectionPage.ProcessRequest(HttpContext
    context)     bij System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()     bij System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)    
    bij System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)     bij System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)     bij System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest
    wr, HttpContext context)     bij System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     bij System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr
    managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     bij System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32
    flags)     bij System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) 1971313a-6baa-49e9-bace-d024ce67f25c

  • How to update list item metadata?

    I want to implement lists.asmx > UpdateListItems method. In the update method (the caml) i would like to use barcode as a filter instead of item ID. http://msdn.microsoft.com/en-us/library/office/ms440289(v=office.14).aspx 
    How would my caml look like?
    <Batch OnError="Continue" ViewName="CA28BFCC-4CCE-4EF8-B08F-7824535E13FC">
    <Method ID="1" Cmd="Update">
          <Field Name='BarCode'>6061114511</Field>
          <Field Name="Title">New Title 2</Field>
    </Method>
    </Batch>

    Hi  ,
    You cannot use barcode as a filter instead of item ID by using OOTB  list.asmx. You could build your own custom web service that uses the either the SPQuery class or linq and gather the items based on
    a particular field value.
    For more information, please take a look at the thread:
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/af23f9f0-2640-474c-9616-522fcb639029/listserviceupdatelistitems-update-reference-field?forum=sharepointdevelopmentlegacy
    I recommend that you  update list items with listdata.svc.
    Reference:
    http://chuvash.eu/2011/12/15/update-list-items-with-listdata-svc/
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Is it possible to query an Item with two or more conditions in OOB Update List Item WF Step

    In SharePoint Designer 2010, in Workflows, is it possible to give more then one condition when querying items? Let me explain, it is fairly easy to drop Update item in this list step, and say, for example, Update item with ID X. However, if is it possible
    to do something along this lines with OOB steps, Update an item in this list where Title is Equal to "abc" and Modify date no older then 3 days.
    Update: Workflow is started when the item is added to the list. What I would like is to update some fields on this item depending on information in this item and in external list. For example
    Current Item Field 1 has value "abc"
    Current Item Field 2 has value "123"
    Current Item Field 3 has value "456"
    External List has Item with value in Field 1 "123"
    External List has Item with value in Field 2 "abc"
    External List has Item with value in Field 3 "xyz"
    Update Current Item Field 3 with value "xyz"
    In short I would need following query - Update Current_Item_Field_3 with value from External_List_Field_3 where Field 1 is equal to Current_Item_Field_2 and Field 2 is equal to Current_Item_Field_1

    Hi,
    From your description, I understand you want to update list item with workflow based on two or more conditions.
    To resolve your issue, you need to use “If current item field equals value” condition. Use this condition to compare a field in the current item that the list or reusable list workflow is currently running on to a value. Values can be static text, dynamic
    strings, and lookups to variables, context information, or other SharePoint fields. And you can learn more about each condition by referring to the article:
    https://support.office.com/en-in/article/Workflow-conditions-in-SharePoint-Designer-2010-A-quick-reference-guide-d8e33ac7-9336-487f-a60b-388c4ea497ff?ui=en-US&rs=en-IN&ad=IN
    I assume your External List is called “ListB”, and Current List is called “ListA”, You can follow the steps below:
    1. Add “If current item field equals value" for condition that ListB Field2 equals to ListA Field1, then set the second condition “ListB Field1 equal to ListA Field2” as the “Find the List Item” in the “Lookup for Single line of text”
    as the screenshot below:
    2. Add “Update List Item” as the screenshot below for updating Current_Item_Field_3 with value from External_List_Field_3. In addition, you should set “Find the List Item” in “Lookup for Single line of text” same to the “Find the List Item” in step 1:
    In addition, if you have more conditions, you could add “If current item field equals value” condition, and you should set each “Find the List Item” in “Lookup for Single line of text” same to the “Find the List Item” in step 1.
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Provision a document library definition with managed metadata column using Visual Studio 2010 designer

    hi all,
    how can i create a document library with a managed metadata column and lookup column .
     what  should be the  type for managed metadata column ? is it "Taxonomy", if yes how can i enter the term set values which should be populated by default.
    also would like to know how to refer the parent list / column[field] in the loopkup field
    help is appreciated!
    thnx

    Hi,
    To add a Managed Metadata field into the list definition, you can take a look at the link below with steps in details about the same requirement.
    http://gheckoplus.blogspot.com/2011/10/how-to-sharepoint-2010-list-definition.html
    For the Lookup field:
    http://abdulazizfarooqi.wordpress.com/2012/08/17/provisioning-lookup-field-in-sharepoint-2010-lookup-field-in-the-list-in-sharepoint-2010/
    http://ronsp.wordpress.com/2011/04/27/declaratively-adding-a-lookup-field-to-a-list-schema-using-customschema-attribute-in-listinstance/
    What’s more, if you have several questions to ask, I suggest you post them into every single thread to make them easier to be discussed in the forum.
    Best regards
    Patrick Liang
    TechNet Community Support

  • How do I copy the value of a managed metadata field into a text column in the same list?

    I have a SharePoint designer workflow that I am trying to use to copy the value of a managed metadata field, into a text field. So basically my workflow is this...
    Stage 1: Set [MyColumnValue] to [%Current Item:MyColumn_0%]
    Go to End of Workflow
    This seems like a simple enough task, but each time an item is added or updated in my List, all I get for my new column [MyColumnValue] is just a link that says "Stage 1". Am I missing something here? Shouldn't this workflow be able to just copy
    the value from the managed metadata column to the text column?

    When you create a workflow on a list/library it automatically creates a new FIELD with the name of workflow and it's status. It sounds like you're viewing the Workflow status field, and not the field that the workflow is putting the values into. Make sense?
    So edit the view and add the new field in.

  • Update Managed Metadata field in SharePoint 2013 Designer Workflow for O365

    Hi Guys,
    I need to update the managed metadata field in SharePoint Custom List using Workflow but its not working. I have also tried to use the HTTP WebService POST Operation but no luck.
    Am doing this for a SharePoint Online (O365) Site.
    Has anyone worked on something similar and was able to get it running ?
    I saw a post to create a custom Workflow Activity but I don't have a choice to go with the custom code option.
    http://patrickboom.wordpress.com/2013/07/23/workflow-activity-set-managed-metadata-column/
    I was able to achieve this by creating a SP 2010 based Workflow for O365. Which means that it worked well with SP 2010.
    Is there a different way to do it in 2013 ? I tried almost all options apart from creating custom Activity but nothing worked out. 
    Any help would be great.
    Thanks,
    Nutan
    Nutan Sharma

    Hi Nutan,
    According to your description, my understanding is that you want to update Managed Metadata field with SharePoint 2013 Designer for SharePoint Online.
    As far as I know, there is not an OOB action to achieve your requirement with SharePoint 2013 Designer for SharePoint 2013. Customizing a workflow action is a better option to achieve it.  Why didn’t you customize a workflow action as Patrick’s blog?
    In addition, please take a look at the article about Nintex workflow, check whether it is useful for you:
    http://habaneroconsulting.com/insights/setting-managed-metadata-fields-in-a-nintex-workflow#.UykBSf6KDHo
    As this issue is about SharePoint Online, I suggest you create a new thread on SharePoint Online forum:
    http://social.technet.microsoft.com/Forums/en-US/home?forum=onlineservicessharepoint . More experts will assist you.
    I hope this helps.
    Thanks,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • What is the easy way to update Managed Metadata field multi select values using client object model C#?

    The below mentioned code works sometimes and doesn't most of the time. What is the real best way to update multi select managed metadata fields?
    Microsoft.SharePoint.Client.File file = site.GetFileByServerRelativeUrl("/sites/myspsite/Documents/Presentation2.pptx");
    clientContext.Load(file);
    clientContext.ExecuteQuery();
    ListItem currentItem = file.ListItemAllFields;
    clientContext.Load(currentItem);
    clientContext.ExecuteQuery();
    currentItem["Country"] = "-1;#India|1d13cfe9-d6f4-4bd3-a6c7-4b46a81f2a96;#-1;#China|9c1dff73-82db-44b1-8d70-f4258dd24e47;#-1;#USA|b9295c0b-67d4-4dc5-99d4-e88af888de48";
    currentItem["Title"] = "Demo Doc";
    currentItem.Update();
    clientContext.ExecuteQuery();
    file.CheckIn("test check-in", CheckinType.MajorCheckIn);
    clientContext.ExecuteQuery();
    Anuradha!!

    Hi,
    Here are two blog for your reference:
    How to Work with Managed Metadata Columns by Using the SharePoint Client Object Model
    http://blogs.msdn.com/b/sharepointdev/archive/2011/11/18/how-to-work-with-managed-metadata-columns-by-using-the-sharepoint-client-object-model-kaushalendra-kumar.aspx
    SharePoint 2010 Code Tips – Setting a Managed Metadata Field with the Client Object Model
    http://sharepointfieldnotes.blogspot.com/2011/08/sharepoint-2010-code-tips-setting.html
    Best Regards
    Dennis Guo
    TechNet Community Support

Maybe you are looking for

  • HT5622 How do I pay by credit card for an app when there is a credit on my account?

    I have a credit on my account.  I want to buy a song on itunes with my credit card and not use the credit.  How do I bypass the credit?

  • 10.2.0.3 Patch

    Tried to apply the 10.2.0.3 RDBMS patch to 10.2.0.1 Client. Installer stated there is nothing to patch. Is there a separate 10.2.0.3 patch for the 10.2.0.1 Client?

  • Hyper-V cluster iSCSI not communicating on one host - Catch 22

    I'm in a catch-22, I have a 3 host Hyper-V 2012 cluster connected to a Dell Compellent SAN and Force 10 switches for iSCSI. Host3 simply stopped communicating via iSCSI, I can't ping Host 1 or 2 from Host 3 and vice versa.  I could take Host3 down fo

  • ALV - Group columns and multiple header

    Hello, Is it possible to have a common header for multiple columns in an ALV grid ( OO based). Example: HdrLine1>>>     Header1           Header2 HdrLine2>>>   Fld1 Fld2 Fld3    Fld4 Fld5 Fld6 Thanks Hiri

  • To Change the Readonly Property

    Hi, In Portal  Personal data Screen for belgium , Country of Birth field (Drop Down Box) is  Read Only. We have to change the readonly property. I tried through iView personalisation ,the property of that field is Not readonly. 2) In the WD java Appl