I'm not familiar with scripting but i'm trying to create my first script for the Windows client 7.5 :-) A customer wants to make 2 fields mandatory.
I was able to create a script using OnCurrentSaleBeforeSave. When one of the 2 fields=0, I get a message as expected.
The problem is that the sale is still saved. Is it posible to cancel the save or reopen the current sale so you have to fill in the fields before you continue? I used the folowing script:
'******* Give message if cost=0
if currentsale.Amount=0 then SOMessagebox "Fill in the ammount to continue"
'******* give message if amount >0 but cost=0 *******
if currentsale.Cost=0 and currentsale.Amount >0 then SOMessagebox "Fill in the total cost to continue"
Thanks in advance.