Coming soon: Your brand new Help Center & Community! Get a sneak-peek here

Show message from triggers (CRMScript)


I'm trying check ticket fields when user saves ticket and show message if values are not valid. ExitWithMessage kind of works but it's too intrusive as it fills whole screen. So any alternatives for it? I'm trying to use trigger "Service: Saving a request".

RE: Show message from triggers (CRMScript)


This trigger is not suited for such actions as this can happen from places that does not involve screens.
So this leaves you with some options;  create your own copy of Edit Ticket screen and implement logic for validation in buttons, or use Triggers available under:

  • Service screen: Before button click
    • New request screen: Before button click
    • Add message screen: Before button click
    • Edit request screen: Before button click

Small example for checking if field is empty, and blockExecution;

#setLanguageLevel 3;

EventData ed = getEventData();

if(ed.getInputValue("x_invoice_no.value") == ""){
Von: Michel Krohn-Dale 18. Mrz 2020

RE: Show message from triggers (CRMScript)

Thanks a lot! I'll try that example script.

Von: Mikko Tillikainen 19. Mrz 2020