iFrame does not display properly

Jun 14, 2012 at 8:27 AM

Hello,

I've installed your Javascript and followed your instructions, yet I have the following error when loading the form:

There was an error with this field's customized event.
Field:IFRAME_F1
Event:onreadystatecomplete
Error:The value of the property '$' is null or undefined, not a Function object

The iFrame displays the normal new E-mail template form.

Thank you for your help.

Jun 14, 2012 at 11:33 AM

OK , I solved this first problem by creating a JavaScript Web Resource containing the jQuery (v1.7.2) library and adding it to the form where the Rich Text Box is.
You should probably mention in your documentation that this library is necessary for the script to function normally.

But now the behavior of that text box is strange. It loads the Rich Text Box 20% of the times I load the page. Otherwise it loads the normal full E-mail template page.

Furthermore, when I type text into the Rich Text Box and I want to save the form, I get a warning "Are you sure you want to leave this page? Your changes have not been saved etc."
When I click "Leave this page", changes are saved anyway.

When I exit the form and load the same record, the Rich Text Box does not appear all the time (instead it is the normal full template page) and when I click on "Save", the content of the Text Box field is erased (the hidden field).

Thank you for your help

Coordinator
Jun 14, 2012 at 4:35 PM

Hello HenryJammes:

Regarding $ is undefined, its an obvious error that tells that you have to use JQuery plug-in. So I guess, its not a big deal.

Now as you are saying that RTB is loading 20% of the time. So first you tell me that your record is saved or not? As RTB will work fine only once the record is saved. It needs the ID of the record which we get only after saving the record.

And other problem you are saying that you are getting alert to leave the page. It is coming because there are some unsaved changes in your form.

So may be you are not calling the Xrm.save() or even if you are calling, you can handle it by using CRM.isDirty = false;.

You can search more for their syntax or let me know, I can explain.

 

Jun 26, 2012 at 2:53 PM

Thank you for your response.

For jQuery, I'm just saying that functional consultants might struggle installing and troubleshooting your script. That is why I suggest documenting it.

For RTB loading 20% of the time, record is already created. I use the same set of record to do my tests.

As for the alert, I know it is to alert that some changes have not been saved.
The thing is, it pops up when I click on "Save" in a form where I entered data in the RTB.

Thank you for your help.
Regards

Oct 5, 2012 at 3:43 PM

I have exactly the same issues. Did you find a solution Henry? I need to get rich text boxes on crm online and this seemed to be the simplest way...

Mar 11, 2014 at 9:19 AM
I have followed your instructions. When I open a new record which contains my RTB and IFRAME, for a fraction of second I see something in IFRAME and than IFRAME displays nothing but blank area.