I was looking for a way to make the department field on the sublist line of a JE mandatory depending on the account they choose. I created a Client script to prompt dialog box, but it felt a bit clunky.
Would a UE script make more sense in this situation? I was thinking I could use Before Submit, but I believe the end result would be the same. I was trying to think of a way to get the red * appear on the form once they select an appropriate account.
b
battk
06/04/2020, 12:30 AM
there isnt really a point doing that beforeSubmit
battk
06/04/2020, 12:30 AM
the user has already submitted the record at that time
c
Chris
06/04/2020, 1:17 AM
ah ok I thought Before Submit may stop the submit from happening. I guess Client Script will be the best way to handle this.
Chris
06/04/2020, 1:17 AM
thanks
j
j.j
06/04/2020, 3:41 AM
you will need 2 scripts, client side to do conditional check on account and validate department, server side user event before submit to throw error, only one script will still allow - having done the exact thing
c
Chris
06/04/2020, 2:59 PM
I used a CS to get it to throw an error when validating the line, which seemed like it would stop the user from creating the line in the first place. However I didn't fully test if there was some way around it, I was just testing the dialog box.
I'll take a look at that when I get to that point. Thanks