Skip to Content
0
Former Member
Jun 01, 2009 at 07:34 PM

Update field of type loookup table

61 Views

Hi,

Am working to update a field 'X' of type lookup table[flat] in the database.

Another method of mine returns the value of field 'X' as a string.Now i need to set this value of type string and update the lookup table.

Please find my code below :

String X = getData();

MdmValue m1 = new StringValue(X );

LookupValue m2 = (LookupValue)m1 ;

RecordId recordId = m2.getLookupId();

record.setFieldVlue(FieldId,new LookupValue(recordId));

But this throws a class cast exception.Can someone let me know how to change this string value 'X' to type lookup table[flat]?

How do i update the value of field 'X which is of type lookup flat in my MDM repository? By typecasting or is there someother way of doing the same?

Thanks

Rekha