cancel
Showing results for 
Search instead for 
Did you mean: 

Java APIs for "Checked Out" Records

Former Member
0 Kudos

Hi,

I have a scenario where in we need to show the details about the checked out records. I can see the versions of a record when I check out a particular record in MDM through MDM Data Manager. And I can see both "Original" and "Member" records.

I would like to retrieve these 2 records through Java APIs. I tried to use GetCheckOutRecordsByOriginal function of CatalogData but not with much success.

Can someone please let me know if there are functions to do this?

Thanks and Regards,

Mausam

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Mausam.

Assuming that you have a logged-in <i><b>CatalogData</b></i> object named <i>cd</i> and the record id in an <i><b>int</b></i> variable named <i>id</i>, this is what you should do:

<i>int originalId = -1;

int checkedOutId = -1;

int[] ids = new int[] ;

int recordStatus = cd.GetRecordStatus(<your table code>, ids)[0];

switch (recordStatus)

{

case CheckOutStatusType.ORIGINAL:

originalId = id;

checkedOutId = cd.GetCheckOutRecordsByOriginal(<your table code>, ids)[0][0];

break;

default:

originalId = cd.GetOriginalsByCheckOutRecord(<your table code>, ids)[0][0];

checkedOutId = id;

break;

}</i>

After this, you'll have your original record's id in the variable <i>originalId</i> and the checked-out record's id in the variable <i>checkedOutId</i>.

I hope this is helpful enough.

Best regards,

Nir