3.3.4.128 SaveCustomField

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 2.2.2.1

  1. Set the saveCustomField to SaveCustomField.customField. If saveCustomField is NULL, an appropriate SOAP fault MUST be returned. 

  2. Validate the saveCustomField by performing the processing rules listed under the procedure ValidateCustomField

  3. If the record identifier of the custom field object indicated by saveCustomField.customFieldId is NULL, add the object saveCustomField to Custom fields as follows: 

  4. If saveCustomField.customFieldorigin is equal to enum value CustomFieldOrigin.BuiltIn, an appropriate SOAP fault MUST be returned. 

  5. Find the number of existing rows in the ADM_CustomFieldsTable where CustomFieldDetails.Origin field is not equal to CustomFieldOrigin.BuiltIn

  6. 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. 

  7. 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. 

  8. Set the saveCustomField.customFieldId to the value of RecordId of the newly added row. 

  9. If saveCustomField.Type object is equal to CustomFieldType.Multivalued, then for each customFieldValue object in the collection of custom field values saveCustomField.CustomFieldValues

  10. Add customFieldValue to the ADM_CustomFieldValuesTable.  

  11. Set the CustomFieldRecordId of the row as saveCustomField.customFieldId

  12. Set the Value field of CustomFieldValueDetails as customFieldValue.Value

  13. Return the RecordId of the newly created CustomField entry; that is, saveCustomField.customFieldId as SaveCustomFieldResponse.SaveCustomFieldResult

  14. If the RecordId of the custom field object indicated by saveCustomField.customFieldId is not NULL, perform the steps listed in the operation UpdateCustomField (section 3.3.4.147.2.1) to update the entry in IPAM data store, with updateCustomField data set as saveCustomField

  15. Return 0 as SaveCustomFieldResponse.SaveCustomFieldResult