onLoad User Error Message 10-11-07

I created a onLoad event on the Account entity that hides a few tabs
and along with the navigation icons ("Services" and Marketing").
Everything works well, until I open the account form as a read-only
form. To recreate the error message, I use the Account lookup, select
an Account, then click on "Properties".

The error message I receive states:
"There was an error message with this fields customized event.
Field: crmForm
Event: onLoad
Error: 'navService' is undefined"

Any thoughts or suggestions?

Also here is the script that I am using - forgive my sloopy script - I
am a newbie!

if (crmForm.all.customertypecode.SelectedText == "Supplier" ) {
    crmForm.all.tab1Tab.style.display = "none"
    crmForm.all.tab2Tab.style.display = "none"
    crmForm.all.tab3Tab.style.display = "none"
    crmForm.all.tab4Tab.style.display = "none"
    crmForm.all.tab5Tab.style.display = ""
    navServicesloppy.style.display = "none"
    navContracts.style.display = "none"
    nav_account_new_oempartconversions.style.display = "none"
    nav_account_new_designsolutions.style.display = "none"
    nav_account_new_addserviceses.style.display = "none"
    nav_account_new_substituations.style.display = "none"
    nav_account_new_surveies.style.display = "none"
    nav_account_new_trainings.style.display = "none"
    nav_account_new_inventoryreductions.style.display = "none"
    nav_account_new_mspafterhourses.style.display = "none"
    _NA_CS.style.display = "none"
    navQuotes.style.display = "none"
    navInvoices.style.display = "none"
    navOrders.style.display = "none"
    nav_account_new_consignmentsavings.style.display = "none"
    nav_account_new_freightsavingses.style.display = "none";
}

else {
    crmForm.all.tab1Tab.style.display = ""
    crmForm.all.tab2Tab.style.display = ""
    crmForm.all.tab3Tab.style.display = ""
    crmForm.all.tab4Tab.style.display = ""
    crmForm.all.tab5Tab.style.display = "none"
    nav_account_new_vendornumbers.style.display = "none"
    nav_account_new_preferredpartnerprograms.style.display = "none"
    navService.style.display = "none"
    navContracts.style.display = "none";
}

0
awakin
10/11/2007 3:23:18 PM
crm 35858 articles. 1 followers. Follow

3 Replies
759 Views

Similar Articles

[PageSpeed] 19

Hi Awakin,
When we see the source code for the account entity form we can find the 
element having the id navService
<div class="lbItem" tabIndex=0 id="navService" title="View Cases" 
onclick="loadArea('areaService');">
so no error comes.

But when we open it in read only mode, just like you said through properties 
in the lookup
there isn't any element in the form with the id navService

In short, navigation pane on the left side doesn't really exist when we open 
the form as read only. 
so error comes.

You can even replicate the scenario through preview --> Create Form when you 
have applied the javascript.

well what you can do over here is check for the form type in the onload event

switch (crmForm.FormType)  
{
....
}
Valid values:

Undefined Form Type = 0

Create Form = 1

Update Form = 2

Read Only Form = 3

Disabled Form = 4

Quick Create Form = 5

Bulk Edit Form = 6



Regards,
Nishant Rana
0
Utf
10/11/2007 4:17:05 PM
Good practice would be to check if each object exists first, e.g.

if (navService != null)
 navService.style.display = "none";

This would fix your problem
-- 
David Jennaway - Microsoft Dynamics CRM MVP
Web: http://www.excitation.co.uk



"awakin" wrote:

> 
> I created a onLoad event on the Account entity that hides a few tabs
> and along with the navigation icons ("Services" and Marketing").
> Everything works well, until I open the account form as a read-only
> form. To recreate the error message, I use the Account lookup, select
> an Account, then click on "Properties".
> 
> The error message I receive states:
> "There was an error message with this fields customized event.
> Field: crmForm
> Event: onLoad
> Error: 'navService' is undefined"
> 
> Any thoughts or suggestions?
> 
> Also here is the script that I am using - forgive my sloopy script - I
> am a newbie!
> 
> if (crmForm.all.customertypecode.SelectedText == "Supplier" ) {
>     crmForm.all.tab1Tab.style.display = "none"
>     crmForm.all.tab2Tab.style.display = "none"
>     crmForm.all.tab3Tab.style.display = "none"
>     crmForm.all.tab4Tab.style.display = "none"
>     crmForm.all.tab5Tab.style.display = ""
>     navServicesloppy.style.display = "none"
>     navContracts.style.display = "none"
>     nav_account_new_oempartconversions.style.display = "none"
>     nav_account_new_designsolutions.style.display = "none"
>     nav_account_new_addserviceses.style.display = "none"
>     nav_account_new_substituations.style.display = "none"
>     nav_account_new_surveies.style.display = "none"
>     nav_account_new_trainings.style.display = "none"
>     nav_account_new_inventoryreductions.style.display = "none"
>     nav_account_new_mspafterhourses.style.display = "none"
>     _NA_CS.style.display = "none"
>     navQuotes.style.display = "none"
>     navInvoices.style.display = "none"
>     navOrders.style.display = "none"
>     nav_account_new_consignmentsavings.style.display = "none"
>     nav_account_new_freightsavingses.style.display = "none";
> }
> 
> else {
>     crmForm.all.tab1Tab.style.display = ""
>     crmForm.all.tab2Tab.style.display = ""
>     crmForm.all.tab3Tab.style.display = ""
>     crmForm.all.tab4Tab.style.display = ""
>     crmForm.all.tab5Tab.style.display = "none"
>     nav_account_new_vendornumbers.style.display = "none"
>     nav_account_new_preferredpartnerprograms.style.display = "none"
>     navService.style.display = "none"
>     navContracts.style.display = "none";
> }
> 
> 
0
Utf
10/11/2007 4:30:01 PM
On Oct 11, 11:17 am, Nishant Rana
<NishantR...@discussions.microsoft.com> wrote:
> Hi Awakin,
> When we see the source code for the account entity form we can find the
> element having the id navService
> <div class="lbItem" tabIndex=0 id="navService" title="View Cases"
> onclick="loadArea('areaService');">
> so no error comes.
>
> But when we open it in read only mode, just like you said through properties
> in the lookup
> there isn't any element in the form with the id navService
>
> In short, navigation pane on the left side doesn't really exist when we open
> the form as read only.
> so error comes.
>
> You can even replicate the scenario through preview --> Create Form when you
> have applied the javascript.
>
> well what you can do over here is check for the form type in the onload event
>
> switch (crmForm.FormType)  
> {
> ...}
>
> Valid values:
>
> Undefined Form Type = 0
>
> Create Form = 1
>
> Update Form = 2
>
> Read Only Form = 3
>
> Disabled Form = 4
>
> Quick Create Form = 5
>
> Bulk Edit Form = 6
>
> Regards,
> Nishant Rana

Nishant,

Can you help me understand the "switch" context? I am totally new to
this!

Anthony Akin

0
awakin
10/11/2007 6:25:13 PM
Reply:

Similar Artilces:

When I search this group w/my user name nothing from 2010 comes up
Why aren't 2010 questions coming up in search? Try clicking on your own name, this opens your profile pop-up. In the pop-up, click on "Recent posts by this user". I just tried it and it displayed a couple of your 2010 posts somewhere further down in the listing. -- Max Singapore --- "Meenie" wrote: > Why aren't 2010 questions coming up in search? The web interface for this newsgroup doesn't work so well. You could access the newsgroup directly using a newsreader instead at this address news://msnews.microsoft.com/microsoft.public.excel.mi...

saving users exchange profile
I have a couple of user accounts that are for employees no longer with the company. I would like to delete these accounts, but make a backup of the information in their exchange profile in case that information is needed in the future. Is there any way to achieve this? This is a multi-part message in MIME format. ------=_NextPart_000_007D_01CB0981.39DE4410 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Open Outlook as them and export mailbox to a .pst and save it somewhere --=20 Cris Hanna [SBS - MVP] (since 1997) Co-C...

LDAP Recurrent Error
This is a multi-part message in MIME format. ------=_NextPart_000_0006_01C5AFD7.24E2F410 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi! On My Exchange Server Enterprise 2003 Server an LDAP error is logged = EACH HOUR. It's alway about a failed modification over an object that = does not exists. Here is an example Log: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D...

OWA not allowing child users
I have a child domain and the users in the child domain can open their emails that reside on the root normaly, but when trying to use OutlookWebAccess internaly or externaly they are not allowed. I tryed giving full access to exchage folder for those users, I also change the settings of Default web site to \. I also gave users the right to logon locally to the exchange server. Any ideas please help ...

Error
Hi Running Exchange 2003 on Windows 2003 server. We get these error msgs regularly and want to know how to find what is causing it. Also KB article 268831 discusses this but only for Exchange 2000. Is it the same solution for Exchange 2003.?? The event msgs are Event Type: Warning Event Source: MSExchangeIS Mailbox Store Event Category: General Event ID: 1025 Date: 04/03/04 Time: 4:35:31 PM User: N/A Computer: APOLLO Description: An error occurred on database "First Storage Group\Mailbox Store (APOLLO)". Function name or description of problem: EcGenerateReadReport: Function n...

How do I delete a message in my outbox that contains a large file
I tried to send an email containing a large enclosure. Too large to send and now the message is stuck in my outbox. How do I delete the message? I have tried the normal route - cut, delete, but it stays in the outbox and slows down my send/receive capabilities "Lillian" <Lillian@discussions.microsoft.com> wrote in message news:C11E7BA3-C410-48CC-8B15-F6EA284665E7@microsoft.com... > I tried to send an email containing a large enclosure. Too large to send > and > now the message is stuck in my outbox. How do I delete the message? I > have >...

Outlook Express error.
About 2 months ago my computer was hit with the Blaster virus/worm and since then my email stop working. I went to symantec website to download the tool to remove the Balster worm, but everytime i tried to use OE 6.0 it give me this error message: A TCP/IP error occurred while trying to connect to the server. (Account:'xxxxxx', SMTP erver: 'xxx.xxx.xxx.xxx', Error Number: 0x800ccc15). I research on the web, it tells me to uninstall the TCP/Ip stack and reinstall it(ripping???). I am not so computer literate, Can one of you computer guru point me the way on how to d...

error in my code need help plzzzz
hi again im having a bit of a problem, when i try to execute this code i get a error with the fourth line highlighted in yellow, Private Sub CommandButton1_Click() UserForm1.Hide Sheets("workings").Select Range("B18").Select Selection.ClearContents Range("B20").Select Selection.ClearContents Range("B22").Select Selection.ClearContents Range("B24").Select Selection.ClearContents Range("B26").Select Selection.ClearContents Range("B30").Select Selection.ClearContents Range("H18").Select Selection.ClearContents Range...

Integration Manager 10.0 error message
Would anyone know the cause if this error? This fixed assets integration ran with no problem last month. "Integration < > is not ready to run due to the following problems: Source queries are not ready to execute. Query < > cannot be executed until the following problem is corrected:" ------ and nothing is listed! Thanks for any help offerred. Are you able to right click on the source and preview? You may have to remap the source file. Thanks, VJ On Nov 3, 10:57=A0am, Patti <Pa...@discussions.microsoft.com> wrote: > Would anyone know the cause if t...

Network User Name Link On Forms
We run on a novell network. Most of our office databases/documents hav a field for Name, or Initials. We want to link the excel forms to th user name and/or initals so the fields are filled in every tim automatically. We created a user id file, and placed it on a couple of machines Problem is, when linking to it, databases show every field belonging t that specific user. We want it to the run the link formula, plug in the user name, and the make it text so that it stays in the database showing the user tha assigned the field. Should we link to a file on each users hard drive? Should we l...

Outlook 2003
I've noticed that attachments look different in Outlook 2003 than they did in XP when composing messages. In XP, they did not appear inthe message, but under the subject line. Now they look to be embedded in the messae like they do in Outlook Express. Any idea how to change this back? Thanks Change your message format. Plain text = attachments below the message. Rich Text = attachments in the body. HTML = attachments in the header. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, al...

Form OnLoad event for Case Entity not firing?
Hi, Is there something different about the Case entity that prevents a Form onLoad event from firing? I put an alert() call in there and it doesn't fire. I even typed garbage in the event handler and it doesn't error. Other entities like activity seem to work fine. Actually, I can't ge the onSave or the onChange events for any Case fields to fire either.... Thanks for you help! Todd Very interesting - I have the exact same problem with the Opportunity entity in CRM 4.0 Are you using CRM 4.0? Did you upgrade from 3.0? I did fix this for while by importing clean out of the ...

Exchange 2003 and Arcserve 11 Backups
Hi I dont know if anyone has come across this before, We are running exchange 2003 with arcserve 11 (Exchange Backup Agent) on windows Server 2003. Our backups are taking an extremely long time to complete, 29 hrs for a full backup and over 36 hours for a brick level. Our Information store is only 9gb in size and I have spoken to colleagues who run a similar system and their backups take less than 3 hours. Nothing out of the ordinary is running on the system and the CPU utilisation is quite normal during the backup. I have reinstalled arcserve and moved exchange to a seperate server but the p...

Insert object error
In Word 2006 when I try to insert an object from a file (another Word file, Excel file, etc.) as an icon in a Word 2007 document I receive an error "Word cnnot start the converter mswrd632.wpc." What can I do to correct this problem. Thanks. JoeP Click on the Fixit button at http://support.microsoft.com/kb/973904 -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP, originally posted via msnews.microsoft.com "JoeP" <JoeP@discussions.microsoft.com&g...

Accessing another users email (pop3)
How can I can I have another user access my email in a peer to peer network using Outlook 2002? (using pop3 not Exchange Server) ...

Option group & paramater error
I have a form that I wish to use an option group to filter a field on the sub-form. I have input the following code: Private Sub fraStatus_AfterUpdate() If Me.fraStatus.Value = 2 Then Me.Filter = "Status = Closed" Me.FilterOn = True ElseIf Me.fraStatus.Value = 1 Then Me.Filter = "Status = Open" Me.FilterOn = True Else Me.FilterOn = False End If End Sub I have also placed the following code in the subform: Private Sub Form_ApplyFilter(Cancel As Integer, ApplyType As Integer) If ApplyType = acShowAllRecords Then Me.fraStatus.Value = 3 'Show all...

Word 07 as my E-mail editor
How do I do it? This newsgroup is intended for questions about Access, the database product that's part of Office Professional. I'd suggest reposting your question to a newsgroup related to whatever e-mail client you're using (or, as another possibility, to a newsgroup related to Word) -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Art" <Art@discussions.microsoft.com> wrote in message news:765689AA-3793-408A-B8BC-F1619D4699B0@microsoft.com... > How do I do it? > Art wrote: > How do I do it? Sorry. Thi...

Setting up a Custom type, User-defined, Default Chart
When I try to save the User-defined Chart, I get an error saying "can not save this workbook because another open workbook with the same name or add-in. Choose a different name, or close the other workbook or add-in before saving." I don't have an add-in interfering with this, as far as I know. I save the workbook under another name and the User-defined Chart is not saved. How can I save a User-defined Chart and how can I make it my default? I am using MS Excel 2000 (9.0.3821 SR1). ...

User name and password
I am trying to send email and keep getting a message that says please enter your user name and password for the following server. I check remember password and click ok and it just keeps asking to do that over and over. ...

No Longer Receiving RSS Feeds in Oulook '07
I installed Outlook 2007 a week or so ago. I was initially able to get my RSS feeds, but they have all abruptly stopped. I have checked and verified that they are still listed as being subscirbed to, but don't know why I am not getting them. I even tried to subscribe to new ones (which I should get feeds for immediatley)....Nothing ! Can anyone shine any light on this ? Thanks. find and rename the obi file. http://www.slipstick.com/config/backup2007.asp -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Need Help with Common Tasks? http://www.outlook-tips...

messages won't download from pop3 server
I've had WLM for 2 years on this computer, with the same pop3 charter e-mail account. Recently started having trouble downloading messages to WLM, sometimes they would duplicate5X, or like today, can't get them to download at all. Help!? Are you getting any error messages? If you never complete downloading all the existing e-mail messages from a POP3 mail server, the next time it will start over from the beginning and send the messages that you may already have. This is by design of the POP3 mail protocol. As a fail safe, the server always assumes on a lost connecti...

W2k SP4 installed
We have an Exchange 2000 Server (SP3) which was running fine on W2k SP3. After upgrading to SP4 we are now unable to add new users to the Exchange server Adding a new user seems to work okay, and Exchange even says it's creating a mailbox ... but it doesn't. There are no email details on the E-mail Addresses tab in Users and Computers. Adding them manually has no effect either The only error message we are getting is Exchange Event (Event ID 5) not running. Changing the log on details to domain admin does let this service run, but makes no difference to adding new users Here'...

CRM 4.0
I'm using CRM 4.0. The CRM user has all security roles and privileges. There is a contract that is expired. I want to renew this contract, but I receive an error. "An error has occured." Any ideas? Is this a known issue? Help is appreciated. Best regards Either look in the Server Event Log for a record of the Error that has occurred (could be worth copying and pasting the error on here) or turning Development Errors on, this then gives you a ugly ASP.NET view of the error with more detail. The Service Contracting side of CRM has some very enforced Business Logic, wh...

Onload Event
I currently have a field called multiplier on the opportunity form. I am using the Onload event of the form to autopopulate the field with the value of 50, however I need this to be a one time load. For example, if the user creates a new opportunity I need the multiplier field to autopopulate with the value or 50. HOwever, if the user changes the value and brings up the form again we need it to maintain the new value and not populate again with 50. I currently do not see a way of doing this. Thanks for the help! You can use the FormType to do that: //Undefined Form Type = 0 //Crea...

ERROR when opening Excel file #2
Please let me know if you have seen this or know how to fix. I'm getting this error(below) message when opening a pretty basic excel worksheet. Does anyone know how I can find out how it is attached to the file... I've tried everything and can not get rid of it. I desperately need this file to be clean, any suggestions would be greatly appreciated. Cannot find 'c:\program files\IQSC\Q+E\[qe32.xla]qe32'$A1, which has been assigned to run each time [File.xls]Sheet1 is opened. Continuing could cause errors. Continu [yes] [no] There are no macros that I can see att...