• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 584
  • Last Modified:

MS CRM OnLoad error

I have the following code in the OnLoad event. It is supposed to populate an Iframe from a hyperlink that is in another field called new_cllink.

Attached is the error.
{ 
var AccountURL = crmForm.all.new_cllink.DataValue; 
if (AccountURL != null) 
{ 
crmForm.all.IFRAME_CLAccount.src = AccountURL; 
} 
}

Open in new window

Untitled-1.jpg
0
varesources
Asked:
varesources
  • 3
  • 2
  • 2
1 Solution
 
Feridun KadirPrincipal ConsultantCommented:
I've looked at your code for some time. I can't see anything wrong with it.

Do you have any other CRM add-ins installed?
0
 
varesourcesAuthor Commented:
c360 productivity pack
0
 
Feridun KadirPrincipal ConsultantCommented:
Ok. I found this comment regarding c360 in another website which suggests that you should put your script before any c360 script:

From http://www.eggheadcafe.com/software/aspnet/31983951/crmform-is-undefined.aspx

It looks like my actual issue was in the sequence of
my script vs the boilerplate script that c360 inserted automatically
to handle its alert functionality.  If I try to reference crmForm
after their script, it is undefined.  I had believed I had tested my
script before the c360 script or with the c360 script removed
completely, but I must have made a mistake when I did so.
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
varesourcesAuthor Commented:
Thanks. I'll try that tomorrow.
0
 
stacko111Commented:
I think your code is slightly incorrect, also make sure that the new_cllink field is set to be Type: nvarchar and Format: URL.

New code below:

{
var AccountURL = crmForm.all.new_cllink.DataValue;
if (AccountURL != null)
{
document.all.IFRAME_CLAccount.src = AccountURL;
}
}
0
 
stacko111Commented:
Just re-read feridun's posts, I didn't take into account the c360 stuff so if my code doesn't help then ignore me ;o)
0
 
varesourcesAuthor Commented:
feridun

That worked! Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now