3.3.4.68 SaveCustomField
This 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.
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 then 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. While adding set the CustomFieldRecordId of the row as saveCustomField.customFieldId and set the Value field of CustomFieldValueDetails as customFieldValue.Value.
Return the RecordId of the newly created CustomField entry i.e. saveCustomField.customFieldId as SaveCustomFieldResponse.SaveCustomFieldResult.
Else, if the record identifier of the custom field object indicated by saveCustomField.customFieldId is not NULL then:
Perform the steps listed in the operation UpdateCustomField below to update the entry in IPAM data store, with udpateCustomField data set as saveCustomField.
Return 0 as SaveCustomFieldResponse.SaveCustomFieldResult.