cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger validations MDM JAVA API

Former Member
0 Kudos

Hi all,

I got an issue trying to invoke the validations in the MDM Web Dynpro using the JAVA API; first of al I m creating the record before the user can edit it; in that first moment, the record is checked out and the validations are not executed, that is right, but later, when the user is editing the record, we want to force the user to type all the information using only a specific event (Save button) but even if the record is correct, the validations messages are still showing in the user interface.

try {

ModifyRecordCommand cmd = new ModifyRecordCommand(connectionPool);

cmd.setRecord(material);

cmd.setSession(usrSessionIdAdm);

cmd.execute();

} catch (ValidationException e) {

RetrieveValidationsCommand valComm = new RetrieveValidationsCommand(connectionPool);

valComm.setSession(usrSessionIdAdm);

valComm.setTupleDefinitionId(tdIdTuple);

valComm.execute();

ValidationPropertiesResult valResult = valComm.getValidationPropertiesResult();

ValidationProperties[] valProp = valResult.getValidations();

}

Any idea about how to do it?

Thank you!

Claudia

Edited by: Claudia Gómez on Mar 6, 2012 7:24 PM

Accepted Solutions (1)

Accepted Solutions (1)

junwu
Active Contributor
0 Kudos
HI,
are you using MDM Webdynpro component?
you can call validation via the item detail interface,  no need to call via this command.
Best regards,
John

Answers (0)