on 06-05-2011 6:47 PM
Hi,
I am not able to modifya field value and getting a error as Field not found. and not able to update
below is the code im using
TupleValue mValPlant = null;
MultiTupleValue mtvAddress = null ;
MdmValue mvPlants = new StringValue("CL02");
mtvAddress = mtvAddress1;
mValPlant = (TupleValue) mtvAddress.getValue(0);
mValPlant.setFieldValue(tfiPlant, new StringValue("R6"));
mtvAddress.modifyTupleValue( mValPlant ) ;
try {
try {
rrCord_plnt.setFieldValue(tb2, mtvAddress);
} catch (MdmValueTypeException e) {
e.printStackTrace();
}
}catch (IllegalArgumentException e1) {
e1.printStackTrace();
}
ModifyRecordCommand modifyRecordCommand = new ModifyRecordCommand(connection);
modifyRecordCommand.setSession(sesId);
modifyRecordCommand.setRecord(rrCord_plnt);
modifyRecordCommand.setModifyAnyway(true); //this accepts the boolean parameter and the value is case sensitive
try {
modifyRecordCommand.execute();
} catch (CommandException e) {
Hi,
I cannot determine from your code, but I suspect the exception is thrown at either of the following lines:
mValPlant.setFieldValue(tfiPlant, new StringValue("R6"));
...
rrCord_plnt.setFieldValue(tb2, mtvAddress);
and I suspect either the FieldId object tfiPlant or tb2 is unknown. Have you checked whether either of those objects are valid?
Cheers,
Robin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.