Solved

MS CRM OnLoad error

Posted on 2010-08-26
7
571 Views
Last Modified: 2013-11-24
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
Comment
Question by:varesources
  • 3
  • 2
  • 2
7 Comments
 
LVL 29

Expert Comment

by:feridun
ID: 33537553
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
 
LVL 1

Author Comment

by:varesources
ID: 33537574
c360 productivity pack
0
 
LVL 29

Accepted Solution

by:
feridun earned 500 total points
ID: 33537794
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 1

Author Comment

by:varesources
ID: 33537822
Thanks. I'll try that tomorrow.
0
 
LVL 7

Expert Comment

by:stacko111
ID: 33539777
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
 
LVL 7

Expert Comment

by:stacko111
ID: 33539795
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
 
LVL 1

Author Comment

by:varesources
ID: 33542898
feridun

That worked! Thanks!
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Automatically creating a Trello card using data from a Microsoft Dynamics CRM record turned out to be an easy project that yielded great results.  Here's how I did this for an internal team at General Code.
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now