How to make the phone number and Email mandatory while creating a company

Hi All,

How to make the phone number and Email mandatory while creating a company?

Base on some post in the community, I tried to add a table script level checking as below.

if (!FormValues("fieldname"))

{

Valid = false;

ErrorStr = "Field must have a value";

}

But I'm getting the warning message only after company creation even though I added this script in 'Creat Script'. The company is created successfully, then showing this error message. Don 't know am I missing something.

Any help?