SPD Workflow - Update a hidden/read only field

Hi there,
I have a list with a hidden/read only field (ie Status).  So the user cannot update this field using the form or datasheet ...etc.
I have an SPD workflow that I was hoping would modify the value of the Status field.  But it appears as though the option to modify it is not available as long as it is hidden and/or read-only.  Aka, the field doesn't show up in the list of fields
to modify for the "Set field on current item" action.
I was hoping to avoid importing this into a visual studio project and adding in code, which I believe would do the trick; so are there any solutions that I can do within SPD itself?
Thanks in advance.

Hi Eirc,
                   as i understand you question  you want to update hidden filed from workflow ? 
 solution 1 when workflow started it change field read only to false and after completing workflow
change it again true.  by code.
Solution 2 Use javascript to make the field read only on presentation.
http://sputility.codeplex.com/ check this lib that might help you to manage readonly field on runtime
Solution 3 : you achieve by setting column level permission 

Similar Messages

  • Invalid data has been used to update the list item. The field you are trying to update may be read only.

    Trying to follow Serge Luca's Step by Step Tutorial. Creating Workflows for Windows Sharepoint Services and MOSS2007.  http://sergeluca.spaces.live.com/blog/cns!E8A06D5F2F585013!859.entry
    I have an onWorkflowActivated, followed by an ifElse condition and a log to history.
    In the IfElse, each branch has a code segment, that trys to update the status column in the list that the workflow is attached to.
    private void Authorize_ExecuteCode(object sender, EventArgs e)
    // tried serveral methods
    WorkflowProperties.Item["Status"] = "Automatically Approved";
    // tried all of the following (one at a time)
    item.update();
    WorkflowProperties.Item.Update();
    WorkflowProperties.Item.SystemUpdate();
    //tried this as well.
    Microsoft.SharePoint.SPListItem item = WorkflowProperties.Item;
    item["Status"] = "Automatically Approved";
    item.Update() ;
    On the update call I keep getting "Invalid data has been used to update the list item. The field you are trying to update may be read only."
    Could someone explain how to update "Status" column of the list item that the workflow is working on?
    Thank you very much.
    Bill
     

    Hi:
    you can do the following:
    add the following code to the workflow.xml file (under the MetaData section)
    Code Snippet
    <ExtendedStatusColumnValues>
    <StatusColumnValue>Branch1</StatusColumnValue>
    <StatusColumnValue>Branch2</StatusColumnValue>
    </ExtendedStatusColumnValues>
    then add 2 SetState activities one in each branch of the IfElse.
    for the code behind of setState1 (branch1) write the following code:
    Code Snippet
    state = Convert.ToInt32(SPWorkflowStatus.Max);
    for setState2 (branch2) write the following:
    Code Snippet
    state = Convert.ToInt32(SPWorkflowStatus.Max) + 1;
    where state is the variable assigned to the field State in the properties of the SetState(design lever), or instead of state u can use the following code:
    Code Snippet
    ((SetState)sender).State
    where sender is the object sent through the function parameter.
    hope this answered your question
    Best Regards

  • Upload a value in read-only field using Webservices or Workflow

    Can you please let me know if is feasible to upload a value into a read-only field using webservices or workflow
    If so, can you please provide an example?
    Thanks

    Using WS, you cant update the field value, if it is set as "Read-Only" @ the object - Field definition level, but you can update that using WS if it is set as "Read-Only" @ the layout level. Same applicable to Workflows too
    -- Venky CRMIT

  • WebPart is raising the following error "Invalid data has been used to update the list item.The field you are trying to update may be read only"

    I have created a farm solution and then i deploy it to SharePoint server, the code looks as follow, and i use it to update a page info values (as the current page values represents old info):-
    [ToolboxItemAttribute(false)]
    public partial class VisualWebPart1 : WebPart
    // Uncomment the following SecurityPermission attribute only when doing Performance Profiling using
    // the Instrumentation method, and then remove the SecurityPermission attribute when the code is ready
    // for production. Because the SecurityPermission attribute bypasses the security check for callers of
    // your constructor, it's not recommended for production purposes.
    // [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Assert, UnmanagedCode = true)]
    public VisualWebPart1()
    protected override void OnInit(EventArgs e)
    base.OnInit(e);
    InitializeControl();
    using (SPSite site = new SPSite(SPContext.Current.Site.Url))
    using (SPWeb web = site.OpenWeb())
    SPList list = web.Lists["Pages"];
    web.AllowUnsafeUpdates = true;
    foreach (SPListItem items in list.Items)
    items["Author"] = "SharePoint";
    items["Created"] = "01/08/2014 01:44 PM";
    items.Update();
    list.Update();
    web.AllowUnsafeUpdates = false;
    protected void Page_Load(object sender, EventArgs e)
    but when i try adding this web part to a page i got the following error:-
    Invalid data has been used to update the list item.The field you are trying to update may be read only
    so can anyone advice?

    i only changed lines bitween 
    web.AllowUnsafeUpdates = true;
    and
    web.AllowUnsafeUpdates = false;
    and other parts of code remains without change
    so it will updates all pages in current web
    yaşamak bir eylemdir

  • Invalid data has been used to update the list item. The field you are trying to update may be read only (Lookup Field).

    Hi.
    I am getting below error while adding value to look-up field.
    Invalid data has been used to update the list item. The field you are trying to update may be read only.
    I have tried many forums ans post but didn't come to know what's the root cause of issue. I am also posting Code for creating and adding lookup field.
    CAML to create lookup field (It works Fine)
    string lkproductNumber = "<Field Type='Lookup' DisplayName='Product Number' StaticName='ProductNumber' ReadOnly='FALSE' List='" + pNewMaster.Id + "' ShowField='Product_x0020_Number' />";
    Code to insert value to lookup field
    ClientContext client = new ClientContext(SiteUrl);
    client.Load(client.Web);
    client.Credentials = new NetworkCredential(this.UserName, this.Password, this.Domain);
    // Lookup Lists
    List pmList = client.Web.Lists.GetByTitle("Product_Master");
    //List Conatining Lookup Columns
    List piList = client.Web.Lists.GetByTitle("Product_Inventory");
    client.Load(piList);
    query.ViewXml = "<View/>";
    ListItemCollection collection = pmList.GetItems(query);
    client.Load(collection);
    client.ExecuteQuery();
    int prodid=0;
    foreach (ListItem item in collection)
    if (Convert.ToString(item["Product_x0020_Number"]) == ProductNumber)
    { prodid = Convert.ToInt32(item["ID"]); }
    ListItem piItem = piList.AddItem(new ListItemCreationInformation());
    piItem["Product_x0020_Number"] = new FieldLookupValue() { LookupId = prodid };
    piItem.Update();
    client.ExecuteQuery();
    Exception Detail
    Microsoft.SharePoint.Client.ServerException was caught
    Message=Invalid data has been used to update the list item. The field you are trying to update may be read only.
    Source=Microsoft.SharePoint.Client.Runtime
    ServerErrorCode=-2147352571
    ServerErrorTypeName=Microsoft.SharePoint.SPException
    ServerStackTrace=""
    StackTrace:
    at Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(Stream responseStream)
    at Microsoft.SharePoint.Client.ClientRequest.ProcessResponse()
    at WebServiceProviders.ClientServices.NewProductInventory() in Z:\.............ClientServices.cs:line 889
    InnerException:
    Quick response is highly appreciated.
    Thanks
    Mehar

    Try some thing like below,
    your data value that needs to be update should be in this format "ID of the lookup";#"Title of the Lookup" 
    For example,
    listItem["Product_x0020_Number"]
    = "1;#iPhone";
    listItem["Product_x0020_Number"]
    = "2;#Mobile";
    Hope this helped you....

  • Updating Read-Only Field

    All,
    We have some read-only fields (configured @ the page layout settings) in OnDemand edit form
    As per the business rule, the values for these fields has to be set externally using a weblink in the same form
    We are able set back the externally selected values in the OnDemand page to the read-only fields
    But when the user tries to save, the information it is not "Saved" in OnDemand database but it works fine if fields are "Editable"
    Is there a "Server Side" restriction in OnDemand which doesnt allow to update the moidfications on the client side to read-only field on "Save"?
    Are there any workarounds to solve this issue?
    Appreciate your inputs
    Regards,
    Venkatesan
    CRMIT

    Venky,
    If I understand you correctly, you're setting the field values on the client, pushing the values into the edit form. The layout read-only setting has to prevent that - that's what it's for. What you should be able to do is set the values on the back end, using a web service call.
    Regards,
    AO.

  • This operation is not available for read only field 'Type MVF'

    Hi All,
    We are using OrderToCash PIP and we are on Siebel 8.1X.
    While Synching the customer from Ebiz to Siebel facing the following issues:
    Method 'WriteRecord' of business component 'Account' (integration component 'Account') for record with search specification '[Row Id] = "2d3434313239353"' returned the following error:"This operation is not available for read only field 'Type MVF'.(SBL-DAT-00402)"(SBL-EAI-04451)
    Please suggest us what steps to be done in Siebel.
    Thanks
    Maanasa

    First check the process why this is calling Account BC WriteRecord(). The field "Type MVF" might be read only and this sync process is trying to update this field which is read only. This is the reason for the error. Check the OM log / EAI Obj Manager Comp log (set log level to 5) and check.
    Joseph Arul Dass

  • Search help overwrite a read-only field

    Hi, I have some problems with search help and hope someone can help me.
    My search helps (either standards or customs) work perfectly,  but a strange behaviour
    occur on Read-Only fields. If I open the Search Help popup and select a value, it overwrite the
    READ-ONLY value !!!!!
    Hope you can help.

    Depending on the support pack level you are on - search helps - freely programmed or otherwise don't seem to trigger off read only fields (I noticed this when we moved to NW7.01)
    I've got around this by making the field a link to action - providing the read only link I want as the text, and then calling the following code:
    call method cl_wdr_value_help_handler=>handle_application_def_vh
        exporting
          context_element      = context_element
          component_usage_name = 'JOB_SELECTION'
          context_attribute    = 'JOB'.
    Where component 'JOB_SELECTION' is my freely programmed value help - implementing WD interface IWD_VALUE_HELP.
    This was helpful as I wanted the search help to trigger and the user to be able to update the field but only by using the search help - I didn't want the user to be able to write anything in the field.
    it was a particular use case I had - it may or may not fit your needs.
    Cheers, Chris

  • Can no longer select text in email template or read only field with mouse using IE or Firefox?

    Hi Guys,
    I can no longer select text in email template or read only field using my mouse in IE or Firefox anymore. We are using CRM 2011 rollup 18 applied with IE 11 and the latest version of Firefox. We only applied roll up 18 in Feb when this issue began.
    Thanks
    Dave
    David Kelly

    When you have a problem with one particular site, a good "first thing to try" is clearing your Firefox cache and deleting your saved cookies for the site.
    (1) Bypass Firefox's Cache
    Use Ctrl+Shift+r to reload the page fresh from the server.
    (You also can clear Firefox's cache completely using:
    orange Firefox button ''or'' Tools menu > Options > Advanced
    On the Network mini-tab > Cached Web Content : "Clear Now")
    (2) Remove the site's cookies (save any pending work first) using either of these. While viewing a page on the site:
    * right-click and choose View Page Info > Security > "View Cookies"
    * Alt+t (open the classic Tools menu) > Page Info > Security > "View Cookies"
    Then try reloading the page. Does that help?
    These features rely on JavaScript, and it sounds as though you have scripting enabled if you get (the wrong) color changes. Some add-ons might alter the way scripts operate, so a standard diagnostic to bypass interference by extensions (and some custom settings) is to try Firefox's Safe Mode.
    First, I recommend backing up your Firefox settings in case something goes wrong. See [[Backing up your information]]. (You can copy your entire Firefox profile folder somewhere outside of the Mozilla folder.)
    Next, restart Firefox in Firefox's Safe Mode ([[Safe Mode]]) using
    Help > Restart with Add-ons Disabled
    In the dialog, click "Start in Safe Mode."
    If those features work correctly, this points to one of your extensions or custom settings as the problem.
    To also disable plugins, you can use this page:
    orange Firefox button ''or'' classic Tools menu > Add-ons > Plugins category
    Any change?

  • Field Validation on Read Only Field

    I'm trying to create a pop up error box if a field contains null values. The problem is that the field I'm trying to do the validation on is a read-only field. It's the Account field on the Contact Object or Module. It won't allow me to include validation. The goal here is to have a POP UP ERROR box come up if someone does not select a value for that field. Making it required doesn't generate a popup box, it only has a small "required" text next to the field which can be easily missed by a user. Any ideas?

    Hi !
    I found the way to do what you wan't, but it sounds a bit strange for me...
    You have to put a field validation on the Account Id field. I made some tests to know what is in the AccountId field when it's blank and i see that the value is "No Match Row Id" !!
    So your validation rule must be simply
    *&lt;&gt; "No Match Row Id"*
    It worked for me, the error message appears... But I think this is something we have to report to Oracle...
    Hope this will help, feel free to ask more !
    Max

  • Any difference in signature lock function, read-only field property, & signed tab "Mark as read-only

    Is there any real difference between
    1) simply setting a field to read-only in a custom script on the Signed tab of a signature field by:
    this.getField("field name").readonly = true;
    2) including the field in the "Mark as read-only: " list of fields on the Signed tab of a signature field
    and, 3) including the field in a call to the setLock() method of a signature field?
    As far as I can tell there isn't, but am I missing something? And if they are all the same, then since setLock() must execute in a priviledged context, it seems the harder way to get a read-only field.

    Hi Ron,
    It certainly sounds like you are on the right track.What version of Acrobat are you using, is it Pro or Standard, Mac or Win? I see where you mentioned the file was created in Acrobat X, but I'm not sure that the app that create the PDF file is the same version as the one you are using for editing.
    Steve

  • How to make read only field in Task list?

    Hi All,
    How to make read only field in Task list?

    This can be done one of two ways:
    1. Customize the form in Infopath, right click your field and disable the control.
    2. Use JavaScript/jQuery on the page to disable the element.
    Andy Wessendorf SharePoint Developer II | Rackspace [email protected]

  • Read only fields clear with for actions

    Read only fields that are populated via lov mappings clear when any button is pressed on the page. This only happens when the field is read only or disabled. Is this intended and if it is what is the workaround???

    The button must be a submit button.
    Readonly fields or messageStyledTexts are not formElements, that they can post the value back to the ViewObject. Hence they just pass empty value to the underlying VO, when pressed formSubmit. The empty value refreshes the UI when the page refreshes after submit.
    Workaround for this is to have formValuebean that has the same VO attribute and the same LOV mapping as the readOnly field or MessageStyledText. It will act as mirror to submit the values.

  • Read Only Fields

    When a read only field is in a user role and the field is removed, the read only flag disappears.
    How can controls be implemented so that a role can not be added back in and the read only doesn't follow.
    It is important to have some fields read only and some edittable and they may change periodically.

    There is two ways to make a field "Read Only". (1) in step 2 of a Layout (2) Edit the field in the Field Setup.

  • Urgent:Regarding Reports for read only field.

    Hi All,
    Does it happen that the fields which are read only or system defined does not get reflected in report subject area or so ? I have created one report where one field 'Triage' which is Look up window and Picklist read only field is not showing up values in report subject area.Is this due to the field which is a Picklist read only field.
    Quick response will be highly appreciated!!
    Thanks and Regards,
    Manish.

    user12880720 wrote:
    Hi All,
    Does it happen that the fields which are read only or system defined does not get reflected in report subject area or so ? I have created one report where one field 'Triage' which is Look up window and Picklist read only field is not showing up values in report subject area.Is this due to the field which is a Picklist read only field.
    Quick response will be highly appreciated!!
    Thanks and Regards,
    Manish.Hi Manish,
    You do not specific if this is a multiselect picklist you are refering to or what type of reporting you are trying real-time or analytics?
    Anyway please see the below from the help file:
    Multiselect Picklists
    Multiselect picklist (MSPs) values are not supported in real-time reporting subject areas. They are supported in the historical subject areas for the following subject areas:
    Account
    Activity
    Contact
    Dealer
    Lead
    Opportunity
    Service Request

Maybe you are looking for

  • Error while Creating Java model

    Hi, Im creating a java model for EJB DC so as to import it in web dynpro DC... Now im writing a command bean in which Im using DTOs from EJB project. but it is not able to organize any imports for it.. Also, it is giving error at line at CreateExcept

  • Get value of Table data in Event of Table maintaince generaor

    Hi Expert, I want content of table in event of table maintenance generator (Event 01 - Before Saving Data in Database). can you please tell me that how can i achieve this value of whole table in this event. Regards, Chintan Shah

  • Exporting Large Pdfs with Link Indexes - not working

    I have a Large pdf of the Early Church Fathers of 1080 pages with indexs to about 200 chapters... Acrobate will not export past the index pages about 40 to 50 pages then stops and saves file.????? Will not export past 50 pages in Doc, HTML, or Rtf???

  • Average computed incorrectly ?

    Hello , please help me with the following problem. while using OBIEE 11g (11.1.1.5.0) I came into a situation when average is not computed correctly. essentially it happens when creating a simple analysis having a single view that has one or more EXC

  • Adobe form:Data view problem

    Hi,       My problem is i am not able to see data in my dataview on layout. I have everything in my interface, context, but i'm not able to see anything in dataview. i tried reinstalling adobe designer but it didnt worked. Regards, Karthick.