cancel
Showing results for 
Search instead for 
Did you mean: 

MDM API for exclusive checkout

Former Member
0 Kudos

Hi All,

How can we use CheckoutRecordAsNew() API in MDM ??

I want to add a record by checking out exclusively.

I am using the following

int recordID=catalog.checkoutRecordAsNew("TableName",true);

Now I want to update the fields in the record.

catalog.updateRecord("TableName",recordID,timestamp,fields)l

My Q is is this the correct way of adding record ? how can we create timestamp here ?

THanks, Anil

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello.

How did you update a timestampfield from Java?

Regards, Anders

Former Member
0 Kudos

You can get Timestamp using the following API (old)

cataData.GetRecordsById(rsd,IDs).GetChangeStampAt(0);

rsd-ResultSetDefinition

IDs- RecordID array (A2iIntArray)

Anil

Former Member
0 Kudos

Hi.

Thanks for your replay. But I am using the new API set. I found a sollution, see the this thread:

Regards, Anders

Former Member
0 Kudos

Looks like Resultset is NULL..

Its working now!!!

Former Member
0 Kudos

Hi,

I solved the above issue.

I have a new question.

I checked out a record using catalog.checkoutRecordAsNew("TableName",true);

I have updated the field successfully using catalog.updateRecord("TableName",recordID,timestamp,fields)

Now I did a search on RecordID using

catalog.getRecordsByID(rsd,ID)

I am getting the nullpointerException while reading the field.

Value v=rs.getValueAt(0,"MDM_CITY");

I can see the value in the data manager but in my API i don't see that value.

What could be the issue here ??

Thanks, Anil

Former Member
0 Kudos

Hi Anil,

Once you check out a record, you have to then get the record ID of checked out record and make your changes into that record only. When you retrieve data of the checked out record's ID, your changes will be visible.

Regards,

Dheeraj.

Edited by: Dheeraj Kumar on Jul 11, 2008 11:19 AM