The SaveCustomField operation is used to create a new object or update an existing CustomField object in the IPAM data store.
<wsdl:operation name="SaveCustomField"> <wsdl:input wsaw:Action="http://Microsoft.Windows.Ipam/IIpamServer/SaveCustomField" message="ipam:IIpamServer_SaveCustomField_InputMessage" /> <wsdl:output wsaw:Action="http://Microsoft.Windows.Ipam/IIpamServer/SaveCustomFieldResponse" message="ipam:IIpamServer_SaveCustomField_OutputMessage" /> </wsdl:operation>
Upon receiving the IIpamServer_SaveCustomField_InputMessage request message, the server performs the following processing steps. Upon successful completion of the steps specified below, the server MUST respond with the IIpamServer_SaveCustomField_OutputMessage message. In the event of a failure, an appropriate SOAP fault MUST be sent to the client as specified in section 126.96.36.199:
Set the saveCustomField to SaveCustomField.customField. If saveCustomField is NULL, an appropriate SOAP fault MUST be returned.
Validate the saveCustomField by performing the processing rules listed under the procedure ValidateCustomField.
If the record identifier of the custom field object indicated by saveCustomField.customFieldId is NULL, add the object saveCustomField to Custom fields as follows:
If saveCustomField.customFieldorigin is equal to enum value CustomFieldOrigin.BuiltIn, an appropriate SOAP fault MUST be returned.
Find the number of existing rows in the ADM_CustomFieldsTable where CustomFieldDetails.Origin field is not equal to CustomFieldOrigin.BuiltIn.
If the number of non-built-in custom fields in the table is greater than or equal to 128, an appropriate SOAP fault MUST be returned.
Add saveCustomField to the ADM_CustomFieldsTable by setting the corresponding values of CustomFieldDetails. While adding set the Origin property of the row as CustomFieldOrigin.External and clear the value of BuiltinCustomFieldNumber property of the row.
Set the saveCustomField.customFieldId to the value of RecordId of the newly added row.
If saveCustomField.Type object is equal to CustomFieldType.Multivalued, then for each customFieldValue object in the collection of custom field values saveCustomField.CustomFieldValues:
Add customFieldValue to the ADM_CustomFieldValuesTable.
Set the CustomFieldRecordId of the row as saveCustomField.customFieldId.
Set the Value field of CustomFieldValueDetails as customFieldValue.Value.
Return the RecordId of the newly created CustomField entry; that is, saveCustomField.customFieldId as SaveCustomFieldResponse.SaveCustomFieldResult.
If the RecordId of the custom field object indicated by saveCustomField.customFieldId is not NULL, perform the steps listed in the operation UpdateCustomField (section 188.8.131.52.2.1) to update the entry in IPAM data store, with updateCustomField data set as saveCustomField.
Return 0 as SaveCustomFieldResponse.SaveCustomFieldResult.