SoftDesignServices
asked on
Calculated fields in MS Dynamics CRM 4.0
Hi all,
I have created an attribute in Opportunity entity "Total" which should display the total of "Actual Revenue" and "Estimated Revenue".
I have put the following script in the onChange event of "Total" : crmForm.all.new_total.Data Value = crmForm.all.estimatedvalue .DataValue + crmForm.all.actualvalue.Da taValue;
and the script : new_total_onchange0()
in the OnChange event of "Actual Revenue" and "Estimated Revenue" fields.
This does not seem to work for me. Can you please provide you suggestions on this. This is an urgent requirement.
I have created an attribute in Opportunity entity "Total" which should display the total of "Actual Revenue" and "Estimated Revenue".
I have put the following script in the onChange event of "Total" : crmForm.all.new_total.Data
and the script : new_total_onchange0()
in the OnChange event of "Actual Revenue" and "Estimated Revenue" fields.
This does not seem to work for me. Can you please provide you suggestions on this. This is an urgent requirement.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Please help me find out the problem
My comment of 04/05/10 at 3.25pm answers your question.
ASKER
These solutions do not seem to work for me. Is there any other way out?
I tested the solution before posting. COuld you give some more information as to what happens with my suggested solution?
Also, if do try my solution you need to remove any of the existing scripts for the fields in question.
I'm not around until tomorrow now - so I won't be able to reply any more today.
Also, if do try my solution you need to remove any of the existing scripts for the fields in question.
I'm not around until tomorrow now - so I won't be able to reply any more today.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This is working for me now.
Great. What did you do to get it working?
ASKER
1. Created a new attribute new_expectedrevenue
2. Added the attribute to the form
3. Added the code below to the onChange events of each of the following attributes – one off revenue, annualised revenue and closeprobability
crmForm.all.new_expectedre venue.Data Value =((crmForm.all.estimatedva lue.DataVa lue + crmForm.all.new_annualised revenue.Da taValue) * crmForm.all.closeprobabili ty.DataVal ue )/100 ;
crmForm.all.new_expectedre venue.Forc eSubmit = true;
This code works for me and I got the desired output.
Thank you all for your help.
2. Added the attribute to the form
3. Added the code below to the onChange events of each of the following attributes – one off revenue, annualised revenue and closeprobability
crmForm.all.new_expectedre
crmForm.all.new_expectedre
This code works for me and I got the desired output.
Thank you all for your help.
Several comments and ideas were provided in response to the question. SoftDesignServices responses acknowledge that the comments provided assistance. Therefore, some or all of the 500 points should be awarded.
I recommend option 3. Award points to feridun (that is me) http:#a32632789 and Aftab_Khateeb http:#a32632760 equally.
Since our recommendations helped but did not solve entirely SoftDesignServices query, I propose 125 points to each of feridun and Aftab_Khateeb with the remaining 250 points refunded back.
Since our recommendations helped but did not solve entirely SoftDesignServices query, I propose 125 points to each of feridun and Aftab_Khateeb with the remaining 250 points refunded back.
All,
Following an 'Objection' by feridun (at https://www.experts-exchange.com/questions/27016925/11-May-11-17-Automated-Request-for-Review-Objection-to-Accept-Q-26158347.html) to the intended closure of this question, it has been reviewed by at least one Moderator and is being closed as recommended by the Expert.
At this point I am going to re-start the auto-close procedure.
Thank you,
_alias99
Community Support Moderator
Following an 'Objection' by feridun (at https://www.experts-exchange.com/questions/27016925/11-May-11-17-Automated-Request-for-Review-Objection-to-Accept-Q-26158347.html) to the intended closure of this question, it has been reviewed by at least one Moderator and is being closed as recommended by the Expert.
At this point I am going to re-start the auto-close procedure.
Thank you,
_alias99
Community Support Moderator
Add this code in "OnSave" event of the form and then check out the "Total" field, after saving the form with both Actual and estimated revenue fields filled in. you can try with Save or Save and close option as well (then reopen the form)
Also check if the name fields of the estimated revenue and acutal revenue are corrent in attribute list of the entity, i dont hv a CRM to check the exact names of the fields, if they are fine then its all good and just try above mentioned event of the opportunity form (Onsave event).
Let me know how u go