ModifyUserPropertyByAccountName

Function

$().SPServices

Web Service

UserProfileService

Operation

ModifyUserPropertyByAccountName

Example

Here is an example of using ModifyUserPropertyByAccountName from Karel.

<script type='text/javascript'>
var propertyData = "<PropertyData>" +
    "<IsPrivacyChanged>false</IsPrivacyChanged>" +
    "<IsValueChanged>true</IsValueChanged>" +
    "<Name>" + propName + "</Name>" +
    "<Privacy>NotSet</Privacy>" +
    "<Values><ValueData><Value xsi:type=\"xsd:string\">" + propValue + "</Value></ValueData></Values>" +
  "</PropertyData>";
$().SPServices({
  operation: "ModifyUserPropertyByAccountName",
  async: false,
  webURL: "http://dell-dev-dev25/my",
  accountName: userId,
  newData: propertyData,
  completefunc: function (xData, Status) {
    var result = $(xData.responseXML);
  }
});

Back to top