Update and Create, Update

If a step’s action is Update or Create, Update, the UpdateCheck attribute of the <Step> element is used to select the records to be updated. This attribute specifies one or more of the step’s target properties in a comma-separated list.

In this example, the UpdateCheck attribute specifies just one property, ID. After mapping the ID attribute in the import file to the ID property, as defined in the first <Map> element, the step checks for an existing vehicle record with the same ID. If an existing vehicle is found, the record will be updated. If not, a new vehicle record will be added.

<Step Id="1" 
 TargetBusinessObject="Hansen.AssetManagement.Fleet.Vehicle" 
 Action="Create, Update" UpdateCheck="ID">
   <Mappings>
      <Map Source="@ID" Target="ID"/>
      <Map Source="Description" Target="UnitDesc"/>
      <Map Source="VehicleType" Target="UnitType"/>
   </Mappings>
</Step>