CRM 2013 Quick Create Form not opening - dynamics-crm-2013

I'm facing an issue where my Quick Create forms for CRM2013 are no longer opening. What happens is that the header part of the form appears (displaying the name of the entity and the close icon) but nothing else happens.
The form doesn't open, no matter how long I wait. Once I close this quick create form, I get an error from CRM with the following message:
"Unable to set value of the property onRefreshFormSaveCallback"
In Developer Tools, the exception seems to be thrown from a file called JsProvider.ashx
Here is the full dump:
Microsoft Dynamics CRM Error Report Contents
<CrmScriptErrorReport>
<ReportVersion>1.0</ReportVersion>
<ScriptErrorDetails>
<Message>Uncaught TypeError: Cannot set property 'onRefreshFormSaveCallback' of undefined</Message>
<Line>10601</Line>
<URL>/_common/JsProvider.ashx?IsRefreshForm=true&ids=1759665639-1968334880-1039841082-1793205875-1314140682-1547461133-1992083491-1000289424-159335543-542820515-1946640899-1603536461-1264077421-374257838&ver=1052389390</URL>
<PageURL>/_forms/read/page.aspx?_CreateFromId=%7b152C481E-BF12-E411-80BF-00155D148504%7d&_CreateFromType=10007&_searchText=undefined&businessRulesVersion=1033&etc=10013&formts=474159&hidecommandbar=true&mdts=-14853627&setLastViewed=false&showglobalquickcreate=true&userts=130506518819432115</PageURL>
<Function>anonymousr:Cannotsetproperty'onRefreshFormSaveCallback'ofundefined</Function>
<CallStack>
<Function>anonymousr:Cannotsetproperty'onRefreshFormSaveCallback'ofundefined</Function>
</CallStack>
</ScriptErrorDetails>
<ClientInformation>
<BrowserUserAgent>Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36</BrowserUserAgent>
<BrowserLanguage>undefined</BrowserLanguage>
<SystemLanguage>undefined</SystemLanguage>
<UserLanguage>undefined</UserLanguage>
<ScreenResolution>1920x1080</ScreenResolution>
<ClientName>Web</ClientName>
<ClientTime>2014-07-24T15:06:04</ClientTime>
</ClientInformation>
<ServerInformation>
<OrgLanguage>1033</OrgLanguage>
<OrgCulture>3081</OrgCulture>
<UserLanguage>1033</UserLanguage>
<UserCulture>3081</UserCulture>
<OrgID>{FDEC9D90-233C-443B-866F-57D7DA67A40E}</OrgID>
<UserID>{A2FAA665-0DE2-E311-80B8-00155DC8811F}</UserID>
<CRMVersion>6.0.2.51</CRMVersion>
</ServerInformation>
</CrmScriptErrorReport>

Found the solution - one of the other developers had created a format function directly on the string object
String.format = function() {...}
This seemed to mess something up in CRM 2013. Once I removed that declaration, everything went back to normal

Related

debug why time for WebView2_CoreWebView2InitializationCompleted indicates if application will work or fail

How do I debug this? Thanks in advance! Code is several hundred lines of VB.NET and part of a larger set of code; this is the logic flow.
Replacing an Internet Explorer WebBrowser control based application.
The time for WebView2_CoreWebView2InitializationCompleted indicates if it will work or fail.
Windows .NET framework form creates form containing WebView2 V1.0.1264.42
When run in Visual Studio 2019 works. When run from command prompt, fails.
WebView2 form:
form load event call async InitializeCoreWebView2Async
InitializeCoreWebView2Async:
2a) CoreWebView2Environment cwv2Environment = Await CoreWebView2Environment.CreateAsync(Nothing, userDataFolder, options)
2b) Await WebView2.EnsureCoreWebView2Async(cwv2Environment)
WebView2_CoreWebView2InitializationCompleted is raised
(either 3550 milliseconds and rest works or ~600 milliseconds and rest fails)
3a) UserDataFolder is confirmed as set
3b) adds event handlers for:
WebView2.CoreWebView2.WebResourceRequested
WebView2.CoreWebView2.WebResourceResponseReceived
WebView2.CoreWebView2.DownloadStarting
3c) WebView2.CoreWebView2.AddWebResourceRequestedFilter("*",Microsoft.Web.WebView2.Core.CoreWebView2WebResourceContext.All)
3d) CoreWebView2WebResourceRequest request = WebView2.CoreWebView2.Environment.CreateWebResourceRequest(
URIToNavigateTo, "POST", streamBodyToUpload, "Content-Type: application/vnd.microsoft.portable-executable")
3e) WebView2.CoreWebView2.NavigateWithWebResourceRequest(request)
WebView2_NavigationStarting is raised
4a) CoreWebView2WebResourceRequestedEventArgs.ResourceContext is "Document"
5)When this works only in Visual Studio:
5a) CoreWebView2_WebResourceResponseReceived
There is a header with Transfer-Encoding chunked
5b) WebView2_NavigationCompleted
5c) Webview2_DownloadStarting
6 - 10) Remaining download events fire and download is completely received
When this fails, nothing occurs until a timeout of unable to reach the server
5a) CoreWebView2_WebResourceResponseReceived
Header "image/svg+xml"

Getting attribute text from HTML using VBA selenium

I need to get the value "8.37" from the "data-rating" attribute.
<div class="ch-rating"> "VERYGOOD 8.37"
<div class="star-rating star-rating--alt star-rating--ch" data-rating="8.37" style="">
<span style="width: 83.7%;"></span>
</div>
</div>
In java there is .getAttribute() but I can't find the syntax in VBA.
I guess its something like this:
bot.FindElementByXPath("//div[#data-rating]"). followed by some syntax.
To get the value "8.37" from the "data-rating" attribute you can use the following line of code :
bot.FindElementByXPath("//div[#class='ch-rating']/div[#class='star-rating star-rating--alt star-rating--ch']").getAttribute("data-rating")
Update 1
HtmlElement.GetAttribute Method (String)
Syntax :
var attribute = element.getAttribute(attributeName);
where
attribute is a string containing the value of attributeName.
attributeName is the name of the attribute whose value you want to get.
Update 2 :
As you are seeing Run-time error 438: Object doesn't support this property or method for HtmlElement.GetAttribute Method (String) here are some details :
Error 438 occurs when running a program in which a form is assigned to a variable and that variable is used to access a control on the form if the program is on a system running Windows 95 with Regional Settings set to a setting other than English (United States). The error text is:
Run-Time Error #438:
Object doesn't support this property or method
Resolution
There are two possible workarounds for this problem.
Access the form directly rather than by a variable containing the form.
Create property procedures in the form's code to provide access to the properties of the controls on the form.
Status
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This problem has been fixed in Windows 98.
Trivia
To reproduce this bug consistently, you will need HeapWalker, a utility that ships with the Windows 16-bit Software Development Kit and the 16-bit version of Visual C++.
Steps to Reproduce :
From Control Panel, click Regional Settings to open the Regional Settings dialog box. Set the Regional Settings to English (Australian).
Start the 16-bit edition of Visual Basic 4.0. If it is already running, select New Project from the File menu.
Source : FIX: Error 438"Object Doesn't Support This Property or Method"

CI - I added Flexi-Auth, then now I cannot show any pages, session_id issue in libraries/Session.php

I suppose libraries/Session.php is good.
So the issue comes from my code or my settings.
I have added Flexi-Auth to get authentication in my software.
And now, I cannot show any page in the browser.
I've empty the ci_sessions table and I've deleted ci_sessions cookie.
Not better.
To install Flexi Auth, I did :
copy Flexi Auth files in the good places.
And change value of $config['security']['static_salt'] in flexi_auth.php.
Nota 1 :
At the end of flexi_auth.php file,
there is /* Location: ./system/application/config/flexi_auth.php */
But, there is no a application or config folder in system folder.
So I copied this file to application/config/ folder.
The error is :
Error Number: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'session_id`, `ip_address`, `user_agent`, `last_activity`, `user_data`) VALUES ('' at line 1
INSERT INTO ` (`session_id`, `ip_address`, `user_agent`, `last_activity`, `user_data`) VALUES ('aff26d184262b8c4a915adaa40286c19', '127.0.0.1', 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/36.0.1985.125 Chrome/36.0.1985.125 ', 1409755863, '')
Filename: libraries/Session.php
Line Number: 344
Each time I refresh the default page, wich should only show 'coucou',
this number aff26d184262b8c4a915adaa40286c19 and this one 1409755863, change.
It looks like the ci_sessions does not work any more.
This issue, came before I could create my first user, then, login in is impossible.
Nota 2 :
The SQL script given by Flexi Auth to create ci_session table, is not the same as the ci_sessions table I allready have :
Flexi Auth script => user_agent varchar(120) DEFAULT NULL,
My ci_session table => user_agent varchar(120) NOT NULL,
But I don't think this changes something to my issue.
Thanks for help.
Nils.
Don't read anymore, a comment baddly closed (* / instead */) in config file !

Reporting Server throws an error for RunEmbeddedQuery method for XML data source

This the scenario have. There's an SSRS server that has a report where the datasource is of type XML and it uses windows authentication, nothing else to it. Inside the report there's a dataset that uses that data source with this for a query "=Code.ReportUser.GetListOfItems()". This calls a method in the custom assembly that connects to the database and returns data in a string formated like this (angle brackets changed to curly for read
"<Query><XmlData><Items>" + xmlDocument.DocumentElement.InnerXml + "</Items></XmlData></Query>"
where sql datatable is written into the xmlDocument. If I go to the reporting server through an IE and run the report everything works as it should. The Problem occures when add this link to Zangle application which runs it as "IEHOST.app 'report's url'". I believe its a foxpro app that opens a browser object and report fails on the dataset that uses my xml data source. There's no question about url or reports correctness because it functions in a different environment.
This is the server error i get:
library!ReportServer_0-8!ca0!02/24/2012-10:18:45::
Call to GetPermissionsAction(path to my report).
library!ReportServer_0-8!e68!02/24/2012-10:18:45::
Call to GetSystemPropertiesAction().
library!ReportServer_0-8!e68!02/24/2012-10:18:45::
Call to GetPropertiesAction(path to my report, PathBased).
library!ReportServer_0-8!10bc!02/24/2012-10:18:45::
Call to GetSystemPermissionsAction().
library!ReportServer_0-8!e68!02/24/2012-10:18:45::
Call to GetSystemPropertiesAction().
processing!ReportServer_0-8!10bc!02/24/2012-10:18:45::
e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: ,
Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
Error during processing of the CommandText expression of dataset ‘Items’.;
processing!ReportServer_0-8!10bc!02/24/2012-10:18:45::
e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: ,
Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
Cannot set the command text for dataset 'Items'. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
Error during processing of the CommandText expression of dataset ‘Items’.
at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.RunEmbeddedQuery(Boolean& readerExtensionsSupported, Boolean& readerFieldProperties, List`1 queryParams, Object[] paramValues)
--- End of inner exception stack trace ---;
I'm not sure what this means exactly. Any thoughts? it looks like a permission issue but i don't understand where. I did try to change xml data source authentication from windows to none and then add my AD account as an execution user on the reporting server. This didnt' change anything still working from browser but from Zangle browser object. One more thing, server requires authentication and all the report regardless of the environment promt for login and successfully authenticate so my credentials seems to pass to the server and only my xml data source is throwing an error when launched from with Zangle. Please share your ideas. I'm a programmer but I'm not too server stuff savy and I'm new to SSRS. Thank you.
Resolved. Turns out that foxpro app lowercases everything and the name of the sql server passed to the assembly doesn't match the name stored in the assembly. Silly :) So we'll be lowercase comparing everything from now on.

Crystal reports 11 RDC (COM API) displays printer dialog even when I tell it not to prompt

I'm using Crystal Reports 11's RDC (COM) API to print. My code looks like this:
HRESULT res = m_Report->SelectPrinter(b_driver, b_device, b_port);
if (FAILED(res)) return res;
// For these calls, the #import wrapper throws on error
m_Report->PutPrinterDuplex(dmDuplex);
m_Report->PutPaperSize(dmPaperSize);
m_Report->PutPaperSource((CRPaperSource)pdlg->GetDevMode()->dmDefaultSource);
if (m_Report->GetPaperOrientation() == crDefaultPaperOrientation)
m_Report->PutPaperOrientation(crPortrait);
VARIANT vfalse;
VariantInit(&vfalse);
vfalse.vt=VT_BOOL;
vfalse.boolVal=0;
res = m_Report->PrintOut(vfalse);
However, at the end of all this, crystal reports still shows its own printer selection dialog - but only for some reports, it seems. Why does crystal reports show a print dialog even when I pass false for promptUser? And how, then, can I suppress crystal reports' internal printer selection dialog and force it to use my values?
Edit: Whoops, CR11, not CR9.
Some further information:
The reports that work properly (ie, do not show the print dialog) are generated internally using the RDC API; we create a new report object, import subreports into it, then print the result. No problem there.
The reports that do not work properly (ie, force the print dialog to open) have been created with a previous version of crystal reports; however, opening and saving the report does not seem to help.
Sample reports in the Crystal Reports installation directory show the same problem.
I tried reproducing with VBScript; however, the result was that nothing was printed at all (no dialog, no nothing):
Set app = CreateObject("CrystalRuntime.Application.11")
Set report = app.OpenReport("C:\Program Files\Business Objects\Crystal Reports 11.5\Samples\en\Reports\General Business\Inventory Crosstab.rpt")
report.PrintOut(True)
rem Testing with a True parameter to force a print dialog - but no printout and nothing appears (no error either though)
First, let me preface that I'm not a C/C++ programmer, so I'm not able to test the code--my interaction w/ the SDK has been with the VB and .Net interface over the years.
I found the following code from BO's devlibrary:
// A dummy variant
VariantInit (&dummy);
dummy.vt = VT_EMPTY;
HRESULT hr = S_OK;
// Specify the path to the report you want to print
_bstr_t ReportPath("c:\\Program Files\\Business Objects\\Crystal Reports 11.5\\Samples\\En\\Reports\\General Business\\Inventory.rpt");
_variant_t vtEmpty(DISP_E_PARAMNOTFOUND, VT_ERROR);
// Instantiate the IApplication object
m_Application.CreateInstance("CrystalRuntime.Application.115");
//Open the Report using the OpenReport method
m_Report = m_Application->OpenReport(ReportPath, dummy)
//Print the Report to printer
m_Report->PrintOut(dummy, dummy, dummy, dummy);
Does it work? It should print the report with its 'default' printer settings and without prompting.
You wrote:
However, at the end of all this,
crystal reports still shows its own
printer selection dialog - but only
for some reports, it seems.
Generally speaking, I've found that Crystal tends to ignore commands to suppress dialogs if it thinks something is missing. I've found this to be true with the parameter dialog. Perhaps it apply to this situation as well. I would ask what is different about the reports that cause the dialog to be generated. There is a 'no printer' option that can be set. Perhaps this is the common thread.
Do you have access to the VB6 IDE? If you write the equivalent commands using VB6's interface, does the prompting occur?
You might also investigate using the CRPE32.dll instead of the report-designer control. To be honest, I don't know if the RDC wraps the CRPE DLL or is an entirely-separate code base.
Turns out it was a bug in my code after all - I'd previously put in a wrapper for the RDC API to fix certain other bugs we were having; due to the large number of methods in the IReport interfaces, I wrote a script to generate pass-through stubs for the methods I wasn't interested in. Turns out that script was passing in bogus values for parameters with default values. Oops! Fixing the wrapper code fixed the bug here.