Update method in Luminate Web Services

Options
Is it possible to delete a value of a specific field using Luminate Web Services?

Setting the value to null or empty string causes the field to be ignored by Update operation.


According to the documentation (http://open.convio.com/webservices/#operations.update.html
Only fields which contain values or which specify the attribute xsi:nil="true" are updated. Fields missing from the request, or not containing a value, are not changed. 
To delete the value of a given field on Update , you must specify the field in the Update request and explicitly set it null.


Fields however are not one of the request parameters of SoapClient.Update function and there is no way to set attribute xsi:nil on a specific field.

What am I missing?


 
Tagged:

Comments

  • You'll see an example on http://open.convio.com/webservices/#operations.update.html of how to null out a field's value. If you want to remove the current value from the middle name field, you'd use the following in your XML:


    <MiddleName xsi:nil="true" />
  • I saw the example, but I'm not using direct XML. It's a C# app using WSDL reference to the service. 

    Function SoapClient.Update(Session Session, string PartitionId, bool? Force, Record[] Record):RecordModificationResult[]

    There should be some way to enforce null as an actual value. 
  • Looks like the problem lies in the way service reference Update method is building SOAP request envelope. 

    public Luminate_Tools.LuminateWS.RecordModificationResult[] Update(Luminate_Tools.LuminateWS.Session Session, string PartitionId, System.Nullable<bool> Force, Luminate_Tools.LuminateWS.Record[] Record) {
                Luminate_Tools.LuminateWS.UpdateRequest inValue = new Luminate_Tools.LuminateWS.UpdateRequest();
                inValue.Session = Session;
                inValue.PartitionId = PartitionId;
                inValue.Force = Force;
                inValue.Record = Record;
                Luminate_Tools.LuminateWS.UpdateResponse retVal = ((Luminate_Tools.LuminateWS.Soap)(this)).Update(inValue);
                return retVal.Result;
            }


    Update method requires Constituent record as an argument, but then it includes ALL record fields in the request, including fields that are read-only and need to be null, otherwise Update returns an error "Attempt to update read-only field". Meanwhile apparently there is an unspoken rule that if the request contains more than 10 null fields, all null fields are being ignored.

    There are more than 10 read-only fields in the Constituent record, which leads to a situation, where Update method cannot be used to blank out the value of the field, because null values are always ignored. 

Categories