Following example illustrate how record in Base Object can be restored using SIF API. Restore SIF API will change the status of HUB_STATE_IND from -1 to 1 i.e. it will restore the record from soft delete.
RestoreRequest request = new RestoreRequest();
XrefKey xrefKey = new XrefKey();
xrefKey.setSourceKey("23943"); // PkeySrcObject of Record
xrefKey.setSystemName("SAP"); // Source System Name of Record
ArrayList xrefKeys = new ArrayList();
xrefKeys.add(xrefKey);
request.setXrefKeys(xrefKeys); // Required
request.setSiperianObjectUid("BASE_OBJECT.MY_BASE_OBJECT"); //Name of Base Object
RestoreResponse response = (RestoreResponse) sipClient.process(request);
Above request will make the record to Active state. It first update the XREF record followed by BO record. If record is having pending or active state, it will give error.
0 Comment(s)