Quantcast
Viewing all articles
Browse latest Browse all 2504

Unable to update Variable.InterfaceValues through SOAP API

Topic by Calvin Nguyen

Content

Hi,

I was trying to update Variable object through SOAP API, but it seems not triggering the update action.

There is no error occurred in the code. I have 5 interfaces and I want to update the first interface value.

Please help to see if my code is missing something:

public void UpdateVariable(long varId)
   {
       Variable variable = new Variable();
       InterfaceValue[] intfVals = new InterfaceValue[1];
       ID varID = new ID();
       varID.id = varId;
       varID.idSpecified = true;
       variable.ID = varID;

       intfVals[0] = new InterfaceValue();
       intfVals[0].Value = "http://www.google.com";
       intfVals[0].action = ActionEnum.update;

       variable.InterfaceValues = intfVals;
        
       RNObject[] objects = new RNObject[] { variable };
       UpdateProcessingOptions options = new UpdateProcessingOptions();
       options.SuppressExternalEvents = false;
       options.SuppressRules = false;
       ClientInfoHeader clientInfoHeader = new ClientInfoHeader();
       clientInfoHeader.AppID = "Update Variable";
      _client.Update(clientInfoHeader, objects, options);
   }

Thanks for your help.

Calvin

 

 

Code Block


Viewing all articles
Browse latest Browse all 2504

Trending Articles