We'd love to hear from you! Provide  feedback  to earn a badge today. Take our quick survey
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Show a message with process designer on Agent Desktop

Received Response
6
Views
4
Comments
edited Aug 18, 2017 3:34PM in System Admin and Configuration 4 comments

Content

Hello gurus! I have a Custom Process on Create and Update event for CustomObject and I need to validate a field, if exists show a error message. But I Can't solved this requirement I tried with various exceptions.
My question is, this is possible with CPM? if the answer is yes, what can be wrong?
I am using Connect v1_2 and RN version May 2017.

Thanks to all and best regards.

Version

Connect v1_2 and RN version May 2017

Code Snippet

             		$cedula = $Cedula->CedulaProfesional;
	try{	
		if(RNCPM\ActionUpdate == $action || RNCPM\ActionCreate == $action){
			if($cedula !== null || $cedula !== "Sin valor" || $cedula !== ""){
				$roql_result_set = RNCPHP\ROQL::query("SELECT CedulaProfesional FROM CO.Cedula WHERE CedulaProfesional = '$cedula'")->next();
				$row = $roql_result_set->next();
				//print_r($row);
			}
			if($row){
				throw new \Exception("La cédula profesional ya existe");
			}
			else{
				$Cedula->save();
			}
		}
	}
	catch(\Exception $ex){
		echo $ex->getMessage();
		//trigger_error('var must be numeric');
		//throw $ex;
		//print($ex->getMessage());
		exit;
	} 
        

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!