Hello,
I am using the server-side create record function "rbv_api.createRecord()" in an Object script trigger (after create) and I have field level validation on one of the lookup fields (hierarchy relationship). So basically when I create a new record (lets say: type = 1), I have a trigger that creates another similar record based on a condition (lets say: type = 2) and this new record has the original record's ID as its lookup field value.
Now I have a field level validation code set on the lookup field such that, if the lookup field value is empty it should error. So the situation that is happening here is: the first record is being created easily without any issues, however when the trigger is trying to create the 2nd record, an error is being thrown by the field level validation code saying that the lookup field value is not specified. Could someone point me out in the right direction in order to know what I am doing wrong here please?
Cheers.
Iram
Hi Iram,
I have created a lookp with heirarchical relationship,when trigger is deployed to create new record for other object its working fine ,but its getting error when trigger is trying to create on the same object.
This is an issue and thanks for bringing to our notice.I will let you know the fix version very soon.
Regards,
Shiva
Thanks [mention:efd18cd3210243c3a2645cbe9409d974:e9ed411860ed4f2ba0265705b8793d05]. Looking forward to get a date for the fix.
Cheers.
Iram
Hi Iram,
Also, can you please specify whether you are getting any errors while validation the formula while creating trigger ?
Regards,
Shiva
Hello Shiva,
Yes I can confirm that I am getting errors when validating the formula while creating the trigger. Its the same field level validation error that I have set on the field itself.
Cheers.
Iram
Has this issue been fixed in version 4.2?
Iram
Any updates on a fix for this?
Hi Iram,
I will get back to you on this.
Regards,
Shiva
Bump!