Answered by:
how do I tie into the Revise Quote action?

Question
-
I need to update a field when the Revise Quote button(or action) is selected.
So is there some javascript for this?
WithersMonday, April 20, 2009 10:03 PM
Answers
-
Hi,
You can add Statecode, i.e. Status. It will appear as read only, you might hide it, but can check the value, either crmForm.all.statecode.SelectedText or crmForm.all.statecode.DataValue; the first one returns a string, the other one a number.
It saves your original with closed status, and opens up a new one with Draft status; and it's the last one you will receieve and be able to do something with.
So, no SDK (yeah); just check a field.
Morten- Marked as answer by David Withers Monday, April 20, 2009 11:22 PM
Monday, April 20, 2009 11:18 PM
All replies
-
Hi,
Why don't you add a work flow for this.
- Add a work flow on create on Quote
- Condition: If the created Quote is linked to a closed quote (we assume it's a revision), then update your field for the new quote you just created.
The only issue is that this is async. If that is not good enough; you would need a plugin to get it real time.
MortenMonday, April 20, 2009 10:23 PM -
I do have have a WF, the problem is it's taking up to 5 minutes to run. This is too much time.
WithersMonday, April 20, 2009 10:27 PM -
Hi,
What if you check on the Revision ID (number) field, if different from null or 0; then you know it's a revision.....so then assign value to your field....then force a save ... or do an update by using the sdk (http://msdn.microsoft.com/en-us/library/cc677074.aspx)
MortenMonday, April 20, 2009 10:39 PM -
I think I'm going to do an onPageLoad function that checks the status of the Quote status. then sets the value of the Approved field. as long as I only call this onPageLoad I should be fine, correct?
Now my real question is how do I get the status of the quote? do I have to make a SOAP call? When you select revise does it write status then or on save of the revision?
WithersMonday, April 20, 2009 11:11 PM -
Hi,
You can add Statecode, i.e. Status. It will appear as read only, you might hide it, but can check the value, either crmForm.all.statecode.SelectedText or crmForm.all.statecode.DataValue; the first one returns a string, the other one a number.
It saves your original with closed status, and opens up a new one with Draft status; and it's the last one you will receieve and be able to do something with.
So, no SDK (yeah); just check a field.
Morten- Marked as answer by David Withers Monday, April 20, 2009 11:22 PM
Monday, April 20, 2009 11:18 PM