 |
Microsoft Dynamics Support
Visit the Microsoft Dynamics newsgroups and exchange ideas with a community of business professionals and product experts from around the globe. |
|
|
| Author |
Message |
Jeremy Deegan Guest
|
Posted: Wed May 28, 2008 7:58 pm Post subject: onChange, Onload, Onsave |
|
|
Hi all,
I have some scripts that do some field calculations based on the results of
other fields. They work work fine, I placed all of them in all three
(onChange, onSave, onLoad). The only problem is if I try to do an advanced
find on the field that is receiving the value I am getting no results. But if
I do an advanced find for 0 I get results which means the values are not
being saved into the database.
EX:
Field1 = 4
Field2 = 4
Field3 = Field1 + Field2
Field3 is populating with 8
If I do an advanced find for Field3 for 8 I do not receive results. But if I
do an advanced find for 0 the record will appear. Same thing goes for
reports. Any advice?
--
Consultant, CRM |
|
| Back to top |
|
 |
|
|
Bossie Guest
|
Posted: Thu May 29, 2008 12:03 am Post subject: Re: onChange, Onload, Onsave |
|
|
On May 29, 2:58 am, Jeremy Deegan
<JeremyDee...@discussions.microsoft.com> wrote:
| Quote: |
Hi all,
I have some scripts that do some field calculations based on the results of
other fields. They work work fine, I placed all of them in all three
(onChange, onSave, onLoad). The only problem is if I try to do an advanced
find on the field that is receiving the value I am getting no results. But if
I do an advanced find for 0 I get results which means the values are not
being saved into the database.
EX:
Field1 = 4
Field2 = 4
Field3 = Field1 + Field2
Field3 is populating with 8
If I do an advanced find for Field3 for 8 I do not receive results. But if I
do an advanced find for 0 the record will appear. Same thing goes for
reports. Any advice?
--
Consultant, CRM
|
Hi Jeremy,
Without seeing your code/form setup it is hard to see what is going
on. Is your "Field3" read only on your form? If it is you need to
ensure that the form get told to save the value. By default CRM does
not set fields as dirty if they are read only, even if they are
changed. To force a save use the following
crmForm.all.Field3.ForceSubmit();
Note that you only want to use this if the field is actually updated,
not merely in your onSave() or else it is going to force a save every
time the form gets opened.
Cheers
Paul Reyneke
CRM Blog - http://paulreyneke.blogspot.com/ |
|
| Back to top |
|
 |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|