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
Hi Meryk,
Its already fixed as part of 4.0.0.0 release.
Thanks,
Rajkumar
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
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.
Hi, Thanks for the reply.
Please can you tell us if your Trigger Timing is "Before Create" ?
Mery
I confirm the issue now, tracking defect as PSC00331315
Hi Guys,
Is this solved in 4.0.3 please?
Thanks
Meryem
Hi Meryk,
Its already fixed as part of 4.0.0.0 release.
Thanks,
Rajkumar