Function

$().SPServices

Web Service

Webs

Operation

CreateContentType

Example

Thanks to fereko for providing this example. See UpdateColumns for the set up code.

function addContentType(fields){
  var newFields='<Fields>'+fields+'</Fields>';
  $().SPServices({
    operation: "CreateContentType",
    displayName: 'Test', 
    parentType: '0x01', 
    newFields: newFields, 
    completefunc: function (xData, Status) {
      alert(Status+'-'+xData.responseText); 
    }
  });
}

Last edited Dec 1, 2011 at 2:19 AM by sympmarc, version 2

Comments

No comments yet.