rbv_api.createRecord() fails when there is field level valid

Posted by IramK on 21-Jan-2016 11:12

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

All Replies

Posted by Shiva Duriseati on 21-Jan-2016 23:43

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

Posted by IramK on 22-Jan-2016 03:23

Thanks [mention:efd18cd3210243c3a2645cbe9409d974:e9ed411860ed4f2ba0265705b8793d05]. Looking forward to get a date for the fix.

Cheers.

Iram

Posted by Shiva Duriseati on 22-Jan-2016 03:51

Hi Iram,

Also, can you please specify whether you are getting any errors while validation the formula while creating trigger ?

Regards,

Shiva

Posted by IramK on 22-Jan-2016 04:02

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

Posted by IramK on 13-Apr-2016 11:33

Has this issue been fixed in version 4.2?

Iram

Posted by IramK on 09-Aug-2016 04:54

Any updates on a fix for this?

Posted by Shiva Duriseati on 09-Aug-2016 05:16

Hi Iram,

I will get back to you on this.

Regards,

Shiva

Posted by IramK on 09-Aug-2016 06:00
Thanks Shiva.
 
Cheers,
Iram
 
Posted by IramK on 13-Dec-2016 04:00

Bump!

This thread is closed