B2B Service

Get Involved. Join the Conversation.

Topic

    Hamzeh Al Karmi
    Do the scripts entered in the Server Scripts screen reflect...Answered
    Topic posted June 23, 2019 by Hamzeh Al KarmiSilver Medal: 2,000+ Points 
    86 Views, 10 Comments
    Title:
    Do the scripts entered in the Server Scripts screen reflect new records only? Or do they cover existing records?
    Summary:
    Entering a script in the Server Scripts screen functionality issue
    Content:

    Hello all,

    I am currently in the Application Composer > Contacts > Server Scripts and thanks to an answer provided in my past question I have the below script for making the Email field mandatory in the Contacts screen:

    def email = nvl(Email,null)

    if(email.first() == null)

    {

    return false

    }

    return true

    Using existing contacts that were defined prior to the script, I removed the email value in the Email field and when saving the record the system saved successfully. So my question is, does the script entered in the Server Scripts entered only cover the newly created records? Or is there a way to include existing records that were defined before entering the script.

    Thank you,

    Best Comment

    Reghu

    Sorry was busy with something so couldn't respond earlier.  Why cant you (inside a sandbox) disable the validation and try this?

    Have a contact with empty email address, modify some other fied in contact and click save. It should throw your message. 

    Comment