Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4213 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hello,

 

I have a project table which can have many related quotes, but only one quote can be accepted.

 

On the quote layout I have a quote status field with a drop down list of values like, prospect, estimate, accepted...

I have a calculation field on the project table that counts how many related quotes there are that are accepted. 

 

On the quote status field I have an on object modify script trigger that sets the project status based on the changed quote status.

 

I've tried to add to this script the condition that if the user selects "accepted" and the project accepted quote count = 1 then they are shown a dialog box that only one accepted quote is allowed per project and it halts the script.

 

Where I'm having trouble is reverting the quote status back to the previous value it held before it was modified.

 

How would you handle this?

Posted

here's an idea -

 

make a hidden field for a temporary holding place for the quote status field value.

 

make a script that sets the hidden field with the value in the status field - set this script to run onobjectEnter. now, you have the original value saved so that if your condition proves to be true, you can reset the status field with the value that is now being stored in the temporary, hidden field.

 

hth,
Martie

Posted

I would have a field in Project::_kF_QuoteIDAccepted. The script that is triggered OnObjectModify of status would capture the initial value in a script parameter and store it in a $var. Then you can restore the original value from the $var, if the branching in your script dictates that the modification should be reversed.

This topic is 4213 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.