Solved

Modifying a date in a Custom Event with an Oracle Script

  • 8 April 2021
  • 4 replies
  • 175 views

Badge +4

I have a requirement for a Sales Quote that also has a Quote Expiration Date. (yes, it is ovbious that we should just make the field required so thay have to enter a date, but I am required to do it this way.) If the Expriration Date is Blank, take todays date and add 60 days to it and put it in the field. If the Expiration Date is not blank, do nothing. 

The example I was sent from IFS is the attached SalesQuoteExpirationDate.txt 

If you notice in the attachement, there is a ‘DECLARE which goes down a few lines and stops at END;’;

Then there is is code that does the exact same thing as above in a diffrent way, I was told we had to “fool” the system which is why it was done this way. During testing it was found that you have to save it twice and then refreash the screen. I think it is because of having to “fool” the system and this work around is not working. 

 

Sales does not like this. Is there a bettter way to do this through an Oracle Script? I dont mean easier, I know for a fact to make somthing  work the way a end user wants it, it requires work on the part of the developer.

icon

Best answer by NickPorter 8 April 2021, 18:50

View original

This topic has been closed for comments

4 replies

Userlevel 6
Badge +18

As I read that it looks like it isn’t really doing the same thing twice.  It appears to be building the statement to be run in the first part (and storing that statement as “stmt_”), and then that statement (stored as the stmt_ variable) is executed in the second part.

Are you sure it isn’t just a time delay that is happening before the result is calculated and stored?  Needing to refresh the screen to see the newly calculated value makes sense to me, but I don’t know why you would need to run it twice.

Nick

Userlevel 3
Badge +5

@RCusick  You check the attached script which does the same thing.
Believe event execute when new record is adding.. feel free to adjust if needed.

Cheers

Badge +4

@NickPorter it was a Time Delay issue, they were being too impatient 

@EntShehaM Thank you for the file, I saved it because it may be usefull in the future 

Userlevel 6
Badge +18

@RCusick Great, glad you got it resolved