Groovy Script to make Phone or Email mandatory on Before Insert in Database (Doc ID 2268661.1)

Last updated on MAY 22, 2017

Applies to:

Oracle Fusion Sales Cloud Service - Version 11.12.1.0.0 and later
Information in this document applies to any platform.

Symptoms

On : 11.12.1.0.0 version, Accounts, Contacts, Households

Script was created to validate if contact has email or phone number filled.
When executing the script it provides the needed error message when one of the fields is missing but after filling that field and saving, it returns an unexpected error.
 



ERROR
-----------------------
The foreign key value OwnerTableId is invalid. Enter Column PARTY_ID value from table HZ_PARTIES. (HZ-120080)


STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. Add the validation script to the contact object
2. Try to create a contact without phone or email filled
3. An expected error message will be returned to the user
4. Click Ok
5. Fill in the missing data
6. Click save and an unexpected error message is thrown

BUSINESS IMPACT
-----------------------
The issue has the following business impact:
Due to this issue, users cannot create the validation on fields correctly.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms