Kokulan i get the below error from CRM UI: ReferenceError: Web resource method does not exist: Mscrm.BusinessRulesScript.Initialize at e.execute ( vicsdev.crm11.dynamics.com/.../app.js ) at e._executeIndividualEvent ( vicsdev.crm11.dynamics.com/.../app.js ) at e._executeEventHandler ( vicsdev.crm11.dynamics.com/.../app.js ) at Object.execute ( vicsdev.crm11.dynamics.com/.../app.js ) at e._executeSyncAction ( vicsdev.crm11.dynamics.com/.../app.js ) at e._executeSync ( vicsdev.crm11.dynamics.com/.../app.js ) at e.executeAction ( vicsdev.crm11.dynamics.com/.../app.js ) at t.dispatch ( vicsdev.crm11.dynamics.com/.../app.js ) at Object.dispatch ( vicsdev.crm11.dynamics.com/.../app.js ) at Object.dispatch ( vicsdev.crm11.dynamics.com/.../app.js )
↧
Forum Post: RE: Reporting server returns a "Not found" error
↧
Forum Post: RE: Reporting server returns a "Not found" error
If you are finding it difficult to debug your script, you could add a debugger; line to your script and when you refresh the page while dev tool is open, it should hit the debugger line allow you to debug our script. In you javascript, could you also add a console.log(Xrm.Page.context.getClientUrl() + "/CRMReports/rsviewer/QuirksReportViewer.aspx"); and copy the URL and paste it onto browser address bar and see if the URL works. This should confirm that the JS is using the correct URL.
↧
↧
Forum Post: RE: Reporting server returns a "Not found" error
Kokulan i have pasted the full URL in my URL and it came back with the 404 error as well.
↧
Forum Post: My Report server returning a 404 error
I am trying to generate a PDF, but the query returns nothing in the response.i'm I doing anything wrong, // JavaScript source code var reportName = "ACCOUNT2.rdl"; //Name of your invoice report var reportGuid = "f9d93a99-f194-e911-a995-00224800c1e9"; //GUID of your invoice report function runReportToPrint() { var AccountName = Xrm.Page.getAttribute("name").getValue(); var generatepdf = Xrm.Page.getAttribute("new_generatepdf").getValue(); if (generatepdf == 1) { // AccountName = AccountName.substring(4, 9); var params = getReportingSession(); var newPth = Xrm.Page.context.getClientUrl() + "/Reserved.ReportViewerWebControl.axd?ReportSession=" + params[0] + "&Culture=1033&CultureOverrides=True&UICulture=1033&UICultureOverrides=True&ReportStack=1&ControlID=" + params[1] + "&OpType=Export&FileName=" + AccountName + "&ContentDisposition=OnlyHtmlInline&Format=PDF"; window.open(newPth, "_self"); encodePdf(params); } else { return; } } function getReportingSession() { var recordId = Xrm.Page.data.entity.getId(); recordId = recordId.replace('{', '').replace('}', ''); var strParameterXML = " "; // URL of the report server which will execute report and generate response. var pth = Xrm.Page.context.getClientUrl() + "/CRMReports/rsviewer/QuirksReportViewer.aspx"; //Prepare request object to execute the report. var retrieveEntityReq = new XMLHttpRequest(); retrieveEntityReq.open("POST", pth, false); retrieveEntityReq.setRequestHeader("Accept", "*/*"); retrieveEntityReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); //Prepare query to execute report. var query = "id=%7B" + reportGuid + "%7D&uniquename=" + Xrm.Page.context.getOrgUniqueName() + "&iscustomreport=true&reportnameonsrs=&reportName=" + reportName + "&isScheduledReport=false&p:CRM_FilteredAccount=" + strParameterXML; //This statement runs the query and executes the report synchronously. retrieveEntityReq.send(query); //These variables captures the response and returns the response in an array. var x = retrieveEntityReq.responseText.lastIndexOf("ReportSession="); var y = retrieveEntityReq.responseText.lastIndexOf("ControlID="); var ret = new Array(); ret[0] = retrieveEntityReq.responseText.substr(x + 14, 24); ret[1] = retrieveEntityReq.responseText.substr(x + 10, 32); return ret; } function encodePdf(responseSession) { //Create request object that will be called to convert the response in PDF base 64 string var retrieveEntityReq = new XMLHttpRequest(); //Create query string that will be passed to Report Server to generate PDF version of report response. var pth = Xrm.Page.context.getClientUrl() + "/Reserved.ReportViewerWebControl.axd?ReportSession=" + responseSession[0] + "&Culture=1033&CultureOverrides=True&UICulture=1033&UICultureOverrides=True&ReportStack=1&ControlID=" + responseSession[1] + "&OpType=Export&FileName=Public&ContentDisposition=OnlyHtmlInline&Format=PDF"; retrieveEntityReq.open("GET", pth, true); retrieveEntityReq.setRequestHeader("Accept", "*/*"); retrieveEntityReq.responseType = "arraybuffer"; retrieveEntityReq.onreadystatechange = function () { if (retrieveEntityReq.readyState == 4 && retrieveEntityReq.status == 200) { var binary = ""; var bytes = new Uint8Array(this.response); for (var i = 0; i < bytes.byteLength; i++) { binary += String.fromCharCode(bytes[i]); } var base64PDFString = btoa(binary); createNote(base64PDFString ); } }; //This statement sends the request for execution asynchronously. Callback function will be called on completion of the request. retrieveEntityReq.send(); } function createNote(data) { var recordId = Xrm.Page.data.entity.getId(); recordId = recordId.replace('{', '').replace('}', ''); var AccountName = Xrm.Page.getAttribute("name").getValue(); // AccountName = AccountName.substring(4, 9); var refInvoice = new Object(); refInvoice.LogicalName = "account"; refInvoice.Id = recordId; var note = { "objectid": recordId, "objecttypecode":"account", "filename": AccountName + ".pdf", "subject": "Account: " + AccountName, "documentbody": data, "mimetype": "application/pdf" } Xrm.WebApi.createRecord("annotation", note).then( function success(result) { console.log("note created with ID: " + result.id); Xrm.Page.data.refresh(false); // perform operations on record creation }, function (error) { console.log(error.message); // handle error conditions } ); } Please look at my code above.
↧
Forum Post: RE: My Report server returning a 404 error
Kokulan please look at my code above. Cheers
↧
↧
Forum Post: RE: My Report server returning a 404 error
My fetch XML in SSRS looks like this :
↧
Forum Post: RE: Hierachy of opportunities. How to handle mega projects?
Hi, You can setup a custom 1:N relationship with opportunity entity (self referential) and that would allow you to setup a hierarchical visualisation for opportunities. You have to link the opportunity using the new lookup field that gets created. Check the below blog post for the steps. If this answers your question, kindly mark this reply as verified.
↧
Forum Post: RE: error System.Security.Cryptography.CryptographicException Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Execute
Hi Dinesh Can you try the suggestion from the below forum post. stackoverflow.com/.../the-input-data-is-not-a-complete-block-when-decrypting-using-aes
↧
Forum Post: RE: Calendar With Id = 2c640fe4-7dbe-e711-80ea-3863bb348bd0 Does Not Exist
This issue usually comes when we apply a calendar template to multiple resources. Try to create a new calendar template only for the resource in context. Also on the Bookable Resource Entity there is a field called 'Calendar', which you can put it on the form to access the Resource Calendar.
↧
↧
Forum Post: RE: Calendar With Id = 2c640fe4-7dbe-e711-80ea-3863bb348bd0 Does Not Exist
Did you recently do an update to your Field Service? We updated our DEV instance and we got this error. What you need to do is check this GUID in another older environment. In our case it was our TEST environment which still had this GUID. I used SSIS to migrate the Calendar GUID into DEV and everything started working again. I'm not entirely sure what was happening but I fixed it.
↧
Forum Post: Migration CRM 2016 On-Premise to Online
Hello Everyone, Looking for the best Practice Steps form Migration on CRM 2016 On-Prem to D365 Online for Middle East. Please give suggestions Regards, Vikas Gupta
↧
Forum Post: How to validate Field through javascript number between 100 and 300
Hello, I want to validate text field entered value should be between 100 and 300 . Please suggest how to validate thru javascript to prevent save and validate on change.
↧
Forum Post: RE: Migration CRM 2016 On-Premise to Online
Please follow below posts..for best practices..related to Migration... www.nigelfrank.com/.../ask-the-expert-preparing-dynamics-crm-customizations-for-upgrade-to-dynamics-365 nishantrana.me/.../upgrading-from-dynamics-crm-2016-on-premise-to-dynamics-365 community.dynamics.com/.../295502
↧
↧
Forum Post: RE: How to validate Field through javascript number between 100 and 300
if the type of your field is whole number you can already specify min and max values inside the field definition if you need this field to be a text (for example for an external integration), then you still create a whole number field, you hide your text field (or make it read-only) and after with a business rule or a workflow you copy the field from the wholenumber to the text field.
↧
Forum Post: RE: Delete duplication recorders depend on my beefiness rule
My Plugin using System; using Microsoft.Xrm.Sdk; using Microsoft.Xrm.Sdk.Query; namespace CFM.UpdateCustomerAsset.BookingDate { public class SuppressionBookingDates : IPlugin { IOrganizationService service = null; public void Execute(IServiceProvider serviceProvider) { IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext)); ITracingService tracingService = (ITracingService)serviceProvider.GetService(typeof(ITracingService)); IOrganizationServiceFactory serviceFactory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory)); service = serviceFactory.CreateOrganizationService(context.UserId); if (context.InputParameters.Contains("Target") && context.InputParameters["Target"] is Entity) { Entity entity = (Entity)context.InputParameters["Target"]; if (entity.LogicalName == "msdyn_agreementbookingdate") { // tracingService.Trace("AdvancedPlugin: Verifying the client is not offline."); tracingService.Trace("Plugin Entered Agreementbookingdate"); if (entity.Contains("msdyn_agreement")) { //4 tracingService.Trace("Entered Agreement."); if ((entity.Attributes["msdyn_agreement"]) != null) { //5 Guid agreement = ((EntityReference)entity.Attributes["msdyn_agreement"]).Id; // get booking dates with the same agreement and does not have the same id as the entity var fetchXmlDates = " "; fetchXmlDates += " "; fetchXmlDates += " "; fetchXmlDates += " "; fetchXmlDates += " "; fetchXmlDates += " "; fetchXmlDates += " "; fetchXmlDates += " "; fetchXmlDates += " "; fetchXmlDates += " "; fetchXmlDates += " "; fetchXmlDates += " "; fetchXmlDates += " "; fetchXmlDates += " "; fetchXmlDates += " "; fetchXmlDates += " "; fetchXmlDates += " "; fetchXmlDates += " "; fetchXmlDates += " "; fetchXmlDates += " "; var resultDates = service.RetrieveMultiple(new FetchExpression(fetchXmlDates)); tracingService.Trace("Completed FetchXml"); try { tracingService.Trace("Entered Try block"); if (resultDates.Entities.Count > 1) { foreach (Entity bookingDate in resultDates.Entities) { tracingService.Trace("Booking Date", bookingDate.Id); if (entity.Contains("msdyn_bookingdate")) { // check the booking value option set OptionSetValue RelatEntityBookingRec = GetRelatedAtt(bookingDate); OptionSetValue entityBookingRec = GetRelatedAtt(entity); tracingService.Trace("Optionset RelateentitybookingRec"); // get the numbered values to compare between fields and suppress dates var entityBookNum = entityBookingRec.Value; var fetchBookNum = RelatEntityBookingRec.Value; // get month of the date to compare var bookingFetchDate = (DateTime)bookingDate.Attributes["msdyn_bookingdate"]; var entityDate = (DateTime)entity.Attributes["msdyn_bookingdate"]; var bookingFetchCA = ""; var entityCA = ""; tracingService.Trace("BookingFetch CA"); bookingFetchCA = bookingDate.Attributes.Contains("new_customerasset") ? (string)bookingDate.Attributes["new_customerasset"] : String.Empty; entityCA = entity.Attributes.Contains("new_customerasset") ? (string)entity.Attributes["new_customerasset"] : String.Empty; tracingService.Trace("entity CA"); if (entity.Id != bookingDate.Id) { if (bookingFetchDate == entityDate)// && bookingFetchCA == "84f07501-9b39-e911-a960-000d3a4647a5") { if (bookingFetchCA == entityCA) { foreach (Entity item in resultDates.Entities) { if (entityBookNum fetchBookNum) { // delete query var newEntity = new EntityReference(bookingDate.LogicalName, bookingDate.Id); service.Delete(newEntity.LogicalName, newEntity.Id); } } } } } } } } } catch (Exception e) { throw new InvalidPluginExecutionException(e.ToString()); } } } } } } // method to retrieve the attribute from related entity private OptionSetValue GetRelatedAtt(Entity target) { OptionSetValue att = null; // check entity is (only need this if multiple steps/entities are registered for this plugin) if (target.LogicalName.Equals("msdyn_agreementbookingdate")) { Guid x = ((EntityReference)target.Attributes["msdyn_bookingsetup"]).Id; // get a reference to the entity EntityReference relatedEntityRef = new EntityReference("msdyn_agreementbookingsetup", x); // customer can be either an account or a contact. check for account if (relatedEntityRef.LogicalName.Equals("msdyn_agreementbookingsetup")) { Guid relatedEntityId = relatedEntityRef.Id; // get the guid of the related entity // get the attribute of the related entity Entity relatedEntity = service.Retrieve("msdyn_agreementbookingsetup", relatedEntityId, new ColumnSet("new_bookingrecurring")); // query crm for the related entity based on it's id if (relatedEntity != null) { att = relatedEntity.GetAttributeValue ("new_bookingrecurring"); } } } return att; } } } In Complete Source Code Regrades
↧
Forum Post: RE: How to validate Field through javascript number between 100 and 300
Thanks Guido
↧
Blog Post: Dynamics 365 Connector in GCC
Recently I had to work on a PowerApps/Flow solution that would connect to a Dynamics 365 data source. I have done various things previously with the Dynamics 365 connector, but when trying to do the same in my GCC environment, I could not see the Dynamics 365 connector. I thought it was removed, but then I checked my commercial environment and it was there. I checked this with Microsoft and the straight answer was that the Dynamics 365 connector will not be available in Government Cloud. This is aligned with the latest [blog post] from Stephen Siciliano, Principal Group PM Manager for Microsoft Flow. Well what does this mean? Per the post, there are several different connectors that are working with the Common Data Service, and from them 3 are going to be deprecated: The Dynamics 365 connector provides duplicated functionality to that of the CDS connector, and the Dynamics 365 Customer Engagement data is now stored in CDS. The Common Data Service (Legacy) connector was used for connecting to previous version of CDS. All users using the previous connector should have been upgraded. The Common Data Service (Experimental) was a mechanism to try the newest features in the previous version of CDS . As that version of CDS is no longer available, this connector is no longer required. So, what is the end result. There is one Common Data Service connector which we should all be using and connecting to whether on Commercial cloud or Government cloud, and whether we are running an older migrated Dynamics 365 environment or CDS environment. They are basically all the same and will provide the exact same functionality. Hopefully this will save somebody time looking for the same thing.
↧
↧
Forum Post: excution of SSIS package fail from Sql server 2017
Hello i am excuting ssis packge into Sql server 2017 but it's failed and throw some erros(in ssis i insert data to sql db from crm 365) screenshots: Thanks regards.
↧
Forum Post: RE: Custom Workflow that re-assigns Owner has suddenly stopped working
the error is clear "Owner was not provided" it means that the custom activity did not set the OutArgument PreparedBy because (as in the code of the custom activity) if the name is not found or you found more than one, you don't set that parameter. Before your assign you should check if PreparedBy is not null, (with a check condition) and if not null then do the assign.
↧
Forum Post: RE: excution of SSIS package fail from Sql server 2017
Seems like you have quite a few errors, and most due to connection managers. Did you install the license for CozyRoc on your server? Not sure that is the issue, but it seems there is an issue with your connections... A little hard to troubleshoot with just seeing the errors. Good luck with this one.
↧