[beta 4.0.4.] Hierarchy Field Validation still doesn't p

Posted by IramK on 09-Dec-2015 06:14

Hello,

I was just trying out the validation on a hierarchy field and the validation doesn't go away even if I make sure that the value I select is correct. See the attached screenshot.

Original Post: community.progress.com/.../74771

Cheers.

Best Regards,

Iram

Posted by Mohammed Siraj on 11-Dec-2015 05:06

Iram, for hierarchical relationships to identify the parent-side value, you need to define the token as given below:

if({!RB188966#P.id} !== 30277){

  return 'Parent Account is not Microsoft!';

}

//RB188966 is the Relationship integration name

//#P token signifies fetch parent-side value of this hierarchical relation

//id is the Object ID token.

All Replies

Posted by Mohammed Siraj on 09-Dec-2015 06:33

Iram, irrespective of the client-side validation messge, now you should be able to submit the form. That is, unlike earlier, we will not prevent the form from submitting in case of client-side validation errors on server re-direct.

Posted by IramK on 09-Dec-2015 06:36

Yes but I still can't submit, it keeps giving me that error.

Posted by Mohammed Siraj on 09-Dec-2015 07:08

Iram, just to be very sure.

Are you seeing issues with server-side validation after form submit (as per the forum thread that you have referenced) or is it client-side issue with submitting forms if it has server-side validation message.

In the first case, on form submit, it will refresh page but may re-direct user back to the same page if server-side validation has reported failure.

In second case, after first form submit with server-side validation failures, user is being prevented from saving the form that is page is not refreshing.

Posted by IramK on 09-Dec-2015 08:30

Hello Siraj,

I would like to say both I think. So this is what happens: I have a server-side field validation set on the Parent Account field to check if the Account is Microsoft or not.

// 32077 is the ID of the Microsoft Account Record.

if("{!Paccount}" != 30277)
{
return "Parent Account is not Microsoft!";
}

So basically 1) It is refreshing the page, however failing on the server-side validation (because I keep the field empty) and redirecting back to the same page.

2) And now after the first form submit has failed validation, if I try to add Microsoft to the Parent Account, it doesn't allow me to save the record anymore but the page IS refreshing.

Any suggestions?

I have attached the XML file for your reference. Try to create a new Account to test it out.

Cheers.

[View:/cfs-file/__key/communityserver-discussions-components-files/25/CRM_5F00_v1.xml:320:240]

Posted by Mohammed Siraj on 09-Dec-2015 09:15

Hi Iram,

Thanks for the confirmation. Had initially thought that you are seeing the same issue as reported in this post:

community.progress.com/.../76253

However, this seems to be an issue wherein validation trigger is incorrectly flagging a field value as invalid. Thank you for sharing app, will get back to you on this shortly.

Posted by Mohammed Siraj on 11-Dec-2015 05:06

Iram, for hierarchical relationships to identify the parent-side value, you need to define the token as given below:

if({!RB188966#P.id} !== 30277){

  return 'Parent Account is not Microsoft!';

}

//RB188966 is the Relationship integration name

//#P token signifies fetch parent-side value of this hierarchical relation

//id is the Object ID token.

Posted by IramK on 11-Dec-2015 06:39

Thanks Siraj. That's very interesting to know. Did not know you could do that. That does work now.

Cheers.

Iram

Posted by IramK on 11-Dec-2015 06:43

Also a quick question: Has this always worked? i.e. Does it currently work in 4.0.2. in the answer you described above?

Posted by Mohammed Siraj on 11-Dec-2015 07:00

Yes,  this is not a newly introduced 4.0 specific behavior.

Also see:

documentation.progress.com/.../index.html

This thread is closed