3.3.4.148 UpdateCustomFieldAssociation

The UpdateCustomFieldAssociation operation is used to update an association between two custom fields to the IPAM data store.

 <wsdl:operation name="UpdateCustomFieldAssociation">
   <wsdl:input wsaw:Action="http://Microsoft.Windows.Ipam/IIpamServer/UpdateCustomFieldAssociation" message="ipam:IIpamServer_UpdateCustomFieldAssociation_InputMessage" />
   <wsdl:output  wsaw:Action="http://Microsoft.Windows.Ipam/IIpamServer/UpdateCustomFieldAssociationResponse" message="ipam:IIpamServer_UpdateCustomFieldAssociation_OutputMessage" />
 </wsdl:operation> 

Upon receiving the IIpamServer_UpdateCustomFieldAssociation_InputMessage request message, the server performs the following processing steps. Upon successful completion of these steps, the server MUST respond with the IIpamServer_UpdateCustomFieldAssociation_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. If UpdateCustomFieldAssociation.customFieldAssociation is NULL or UpdateCustomFieldAssociation.customFieldAssociation.CustomField1 is NULL or  UpdateCustomFieldAssociation.customFieldAssociation.CustomField2 is NULL, an appropriate SOAP fault MUST be raised.

  2. Check if UpdateCustomFieldAssociation.customFieldAssociation.CustomField1.RecordId exists in ADM_CustomFieldsTable. Appropriate SOAP fault MUST be raised if no such record exists or if the CustomField Type is not Multivalued.

  3. Check if UpdateCustomFieldAssociation.customFieldAssociation.CustomField2.RecordId exists in ADM_CustomFieldsTable. Appropriate SOAP fault MUST be raised if no such record exists or if the CustomField Type is not Multivalued.

  4. Assign UpdateCustomFieldAssociation.customFieldAssociation.CustomField1 and UpdateCustomFieldAssociation.customFieldAssociation.CustomField2 to customField1 and customField2 temp data stores respectively.

  5. Delete all rows in ADM_MultiValueCustomFieldValueAssociationTable where CustomFieldValueId1 is in the set of values customField1.values and CustomFieldValueId2 is in the set of values customField2.values or vice versa.

  6. For each pair customValueAssociation <customFieldValue1, customFieldValue2> in UpdateCustomFieldAssociation.customFieldAssociation.CustomFieldValueAssociations:

  7. Get the row from ADM_CustomFieldValues table which has the same record Id as customValueAssociation.m_Item1. An appropriate SOAP fault MUST be raised if no such record exists.

  8. Get the row from ADM_CustomFieldValues table that has the same record Id as customValueAssociation.m_Item2. An appropriate SOAP fault MUST be raised if no such record exists.

  9. For each pair customValueAssociation <customFieldValue1, customFieldValue2> in UpdateCustomFieldAssociation.customFieldAssociation.CustomFieldValueAssociations, insert a row in ADM_MultiValueCustomFieldValueAssociationTable with values customValueAssociation.m_Item1.RecordId and customValueAssociation.m_Item2.RecordId.