Validation Data Trigger - Before Create

Posted by Meryk on 16-Apr-2015 08:17

Hello,

I am trying to do something very simple with a data validation Trigger on a quick Create page (of object A) before create.

I have an Object B related to object A, and the lookup field of B is there on the quick create of A, and the validation should be done on this field.

When I try to get the value in this field by using the template {!myLookupField}, this field is always empty.

My question is : Because triggers are server side, are they going to work only on existing records (already stored), and not on non existing record yet, which is the case here as I am trying to validate the field value before creating the record ?

Or should this trigger see the value of my lookup field when I only fill it in, and before saving that record ?

Thank you

Mery

Posted by Rajkumar Mateti on 18-Nov-2015 06:00

Hi Meryk,

Its already fixed as part of 4.0.0.0 release.

Thanks,

Rajkumar

All Replies

Posted by Meryk on 16-Apr-2015 08:29

Hi again,

Just realized there was another thread open for a similar issue:

community.progress.com/.../61815.aspx

I believe it is the same issue, and I think Iram's trigger keeps firing because the value "{!Raccount}" is always empty.

Thank you & waiting for your answers :)

Mery

Posted by pvorobie on 16-Apr-2015 11:44

I tried to reproduce this problem and created Validation trigger with the following script:

rbv_api.log("debug",  "Related A: {!R719765}");

if ("{!R719765}"=="" || "{!R719765}"=="-1") return "A must be attached";

When B record is created without attaching A, this trigger generates error. When B record is created with attached A, script produces log like this:

[2015-04-16 09:41:34,965] Related A: 852786

So I cannot reproduce the problem based on provided information. Everything seems to work as expected.

Posted by Meryk on 17-Apr-2015 03:17

Hi, Thanks for the reply.

Please can you tell us if your Trigger Timing is "Before Create" ?

Mery

Posted by pvorobie on 17-Apr-2015 12:03

I confirm the issue now, tracking defect as PSC00331315

Posted by Meryk on 18-Nov-2015 05:56

Hi Guys,

Is this solved in 4.0.3 please?

Thanks

Meryem

Posted by Rajkumar Mateti on 18-Nov-2015 06:00

Hi Meryk,

Its already fixed as part of 4.0.0.0 release.

Thanks,

Rajkumar

This thread is closed