I'm having some problems appending a value to a field by using Javascript in
ONLOAD on the Account form.

In a custom form I've created, however, I don't have that problem. In that
form I use this simple code in ONLOAD, and it works fine:

crmForm.all.fieldname.DataValue = 'TEXT';

In the Account form however, in ONLOAD I try to fill a custom field with some
text using exactly the same code, but it doesn't work - the field remains
empty.

I have admin rights, so I guess that's not the problems. Both fields are
"nvarchar>text".

I hope there's a simple solution to my problem.

Thanks

RE: Problems filling data into custom field on Account form by Merijn

Merijn
Fri Oct 12 01:10:04 PDT 2007

Hi,

Could you try add the following line:
crmForm.all.fieldname.ForceSubmit=true;

Also please mind all JavaScript code is case sensitive!

When opening the account form watch the internet explorer screen, the left
lower corner. Sometimes there is a yellow exclamation mark indicating
something went wrong in the script. If the question mark is there, probably
some other code is failing, and your code concerning the text field is not
hit at all.... To find out this is the case, put // comments before every
line, and uncomment and test till you find which line is failing.

Best regards,

Merijn

"Thomas H. Bech" wrote:

> I'm having some problems appending a value to a field by using Javascript in
> ONLOAD on the Account form.
>
> In a custom form I've created, however, I don't have that problem. In that
> form I use this simple code in ONLOAD, and it works fine:
>
> crmForm.all.fieldname.DataValue = 'TEXT';
>
> In the Account form however, in ONLOAD I try to fill a custom field with some
> text using exactly the same code, but it doesn't work - the field remains
> empty.
>
> I have admin rights, so I guess that's not the problems. Both fields are
> "nvarchar>text".
>
> I hope there's a simple solution to my problem.
>
> Thanks