Required embedded quick create fields

Posted by matman on 13-Nov-2014 08:28

When embedding Quick Create pages, I set some of the fields inside those pages to required. However, these fields are only validated and checked for "required" when any of these fields inside the page contain a value. If none of these fields contain a value, the entire embedded Quick Create component is simply ignored.


I cannot find a way to make sure the record that's supposed to be created will actually be created. How would I be able to do so?

All Replies

Posted by pvorobie on 13-Nov-2014 11:06

Confirmed, tracking as issue PSC00320340

Posted by pvorobie on 13-Nov-2014 13:32

After careful investigation I see no issue. Code works as expected.

Please note that if all fields in Embedded Quick Create components are empty - this component is ignored and no related record created. This is by design.

If you wish to ensure that related fields are populated - add validation trigger to core record.

Posted by matman on 14-Nov-2014 03:15

Hey Pvorobie thank you for your reply. How would I be able to make sure the embedded object record is created? I tried using the validation trigger with code:

if(parseInt("{!R114854158#id}") <= 0) {
return "no object was created!";
}

But when the trigger runs on "Before Create", the embedded object record hasn't been created yet.

I could add a trigger to run on "After Create" but I think that's a bit dirty.

This thread is closed