Is there any way to stop the updates in Dynamics 365 CRM admin?
How to stop/hold updates in Dynamics 365 CRM?
C# Open XLSX file with OpenXML, add values and save it as an attachment to a note
Hey guys,
once again I have a very specific requirement which is cooking up in my brain.
I have two custom entities.
1: Template Entity X
2: Record Entity Y
Whenever a specific field on Record Entity Y has a specific value, a record from Template Entitiy X is retrieved.
This Template Entity X record contains a note with an attachment. That Attachment is an XLSX Excel file.
My Plug-In gets that XLSX file from that template entity X record.
Now I want to open that file with OpenXML, write some values in some columns, close the file and add it as a new attachment to a note to the Record Entity Y record which triggered the plugin.
This is the code I got so far:
#region RetrieveTemplateRecord //Retrieve Template Record QueryByAttribute template_query = new QueryByAttribute("new_customtemplates"); template_query.AddAttributeValue("new_name", "sample_template"); template_query.ColumnSet = new ColumnSet(true); EntityCollection template_result = service.RetrieveMultiple(template_query); Entity template_record = template_result.Entities.First(); //Retrieve Note/Attachment from Template Record QueryByAttribute template_file_query = new QueryByAttribute("annotation"); template_file_query.AddAttributeValue("objectid", template_record.Id); template_file_query.ColumnSet = new ColumnSet(true); EntityCollection template_file_result = service.RetrieveMultiple(template_file_query); Entity template_file = template_file_result.Entities.First(); //Template Body String string template_body = template_file.GetAttributeValue<string>("documentbody"); //Template Body Byte Array byte[] template_data = Convert.FromBase64String(template_body); #endregion RetrieveTemplateRecord #region OpenTemplateInOpenXML //CONTINUTE HERE #endregion OpenTemplateInOpenXML #region DocumentToPriceList string entitytype = "new_pricelist"; Entity Note = new Entity("annotation"); Guid EntityToAttachTo = targetEntity.Id; // The GUID of the incident Note["objectid"] = new EntityReference(entitytype, EntityToAttachTo); Note["objecttypecode"] = entitytype; Note["subject"] = document_type; Note["notetext"] = targetEntity.GetAttributeValue<string>("new_name"); Note["filename"] = template_record.GetAttributeValue<string>("new_name") + ".xlsx"; Note["documentbody"] = Convert.ToBase64String(document_binary); Note["mimetype"] = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; service.Create(Note); #endregion DocumentToPriceList
Can anyone help me out on how to get from the byte[] to a working spreadsheet document in OpenXML and then put it back into a byte[] and then string in order to add it as an attachment to a note?
I have tried several things but cannot find a working way to "open" the document the right way in OpenXML. I Have tried working with a memorystream, with a filestream. But I can't get around the forth and back conversions.
Best wishes and many thankas guys,
Evgeniy
JavaScript Alert : Microsoft Dynamics CRM (Cloud)
Hello Forum Members:
Does anybody have experience with developing custom Alerts, Microsoft Dynamics CRM (Cloud), with JavaScript?
I know the JavaScript code to use to but don't know the easiest way to test custom page and alert.
Please help! Thanks!
Date of Last Activity
I've looked through the posts on the board and have been able to create the Date of Last Activity fields for Leads and Opps. Unfortunately the field is not automatically updating and requires the end-user to click the Refresh icon right next to the field.
I'm looking to do two things
1) Have the Date of Last Activity populated for all existing leads / opps based on whatever date the last activity occurred
2) Have the Date of Last Activity update automatically when an Activity is performed on a lead or opp
I've tried to add a process as described here -https://blog.crgroup.com/how-to-display-the-date-of-last-activity-in-dynamics-crm/ - but I cannot figure out how to get this done. My process screens look nothing like theirs. I'm using Microsoft Dynamics CRM 2016 currently and upgrading to 365 is not going to happen near term.
Anyone have any suggestions on how to accomplish this?
Change Order of Entities listed in Default Report Filter
Is it possible to change the order of the entities that are shown the report default filter when prefiltering is enabled? For example I have prefilter for Accounts and Contacts. If I wanted the contact entity to be shown first, then accounts below it, is that possible? if so, how?
Thanks.
System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0
I get this when I try to load my CRM page. Version 8.2.12.14
System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0
I have tried adding to webconfog but nothing seems to work.
Thanks
On-prem Dynamics CRM 2016 Save & Close not returning to opening page
[Forgive the cross-post, but I figure there are perhaps different audiences monitoring the two sites.]
This is for CRM 2016 On-Prem. We use IE 11 because of some crufty in-house "enterprise apps."
If a browsing session is opened by navigating to one of our applications first, and a user clicks on a link in that application that takes them to a CRM entity instance, we open that in a new tab (<a href="..." target="_blank">
). When the user edits the entity and presses the Save & Close button, it closes the new tab and thus returns to our application. This is the desired behavior.
However, we also access our applications via nav bar items on various entities such as Opportunities (FYI, PassParams="1"
is set for these nav bar items, but I have tested with and without that specified on the nav bar item for the below demo page and it makes no difference). So in that case, the sequence is:
- Open an entity instance in CRM, such as a specific Opportunity, perhaps from an Opportunity view or from a CRM dashboard.
- Click on the nav bar item, opening our custom application (either in a new tab or in an iframe on the same form - doesn't matter for this scenario).
- In our custom application, click on a link that opens a new tab to a different CRM entity instance to be edited, for example, a Contact.
- Edit the instance and hit Save & Close.
- Instead of closing, the tab returns to either a list view of the entity in question (Opportunities, in this case), or, if the original instance in #1 was opened from a CRM dashboard, then returns to that dashboard.
Setting rel="noreferrer"
on the anchor in our application to open the second CRM entity instance makes no difference.
To rule out anything in our custom applications I created the following web page, put it in its own web app, and created a new nav bar item on the Opportunity to open it. We get the same behavior. If I open the web page below directly by navigating to it and click the link, it opens the CRM entity in a new tab, and Save & Close closes that tab and returns me to the page below. However, if I open this page via a nav bar item on an Opportunity and then click the link below, Save & Close keeps the new tab open and returns to the Opportunity list (because that's where I opened the Opportunity from).
<html><body><ahref="">crm/.../main.aspxtarget="_blank">click me</a></body></html>
Hopefully the above all makes sense and this is something stupid I am missing in the SDK documentation.
minimum security role requirements to cancel and resolve a case
Hi all,
I've created a custom Model-Driven App and have added cases to the app. Everything seems to work fine and in my custom security role I've set organization level for all CRUD operations for Case, Account and Contact.
I've also set organization level for Subject, activitiy.
I've also set user level for User Entity UI Settings and User Entity Instance Data but it's still throwing up a insufficient privileges error for our users when they try to resolve or cancel a case. I then went into the BPFs and checked Organization for all the BPFs as well.
Is there any other security role areas I'm missing?
Deactivating Records
When deactivating records, does this automatically exclude that contact from receiving marketing materials?
Load base64 encoded field
Hello, all I am new to crm,
I'm reading a database from Microsoft CRM. That works fine. I need to read the notes field from the database (annotation based). Like in this screenshot:
My code for loading the information I need:
LIB CONNECT TO 'CRM';
LOAD someuninterestingfield1,
someuninterestingfield2,
someuninterestingfield3,
someuninterestingfield4,
someuninterestingfield5,
someuninterestingfield6,
BASE64ENCODEDFIELDINEED;
SQL SELECT someuninterestingfield1,
someuninterestingfield2,
someuninterestingfield3,
someuninterestingfield4,
someuninterestingfield5,
someuninterestingfield6,
BASE64ENCODEDFIELDINEED
FROM "CRM_DATABASE".usr.AnnotationBase;
BASE64ENCODEDFIELDINEED has a base64 encoded xml-file I need for my analysis. I have no idea (I couldn't find anything about decoding data while or after loading in Qlik Sense) how to decode the content to finally receive my xml-data. I'm using Qlik Sense 3.0 and MS CRM 2015 (on premise).
Can someone help me?
Thanks in advance.
How do I capture email addresses in reply-to field?
Hi,
We use Dynamics CRM that captures emails sent from a feedback form using a third-party service like Sendgrid.
The emails have a noreply address in the 'From' field, and the actual user's email address in the 'reply-to' field.
Right now, Dynamics is capturing the email from the 'From' field only, which only has the default noreply email address.
How do we configure it to capture the user's email address from the 'reply-to' field?
Switch BPF using only Workflow for D365 v9.0 online
Hi,
I have 7 BPF for Lead entity & I want to switch BPF automatically based on change of field condition.
We know that SetProcess action is deprecated from workflow action.
Is there alternative to SetProcess action using workflow only.
No Javascript.
Thank You !
Switch BPF using only Workflow for D365 v9.0 online
Hi,
I have 7 BPF for Lead entity & I want to switch BPF automatically based on change of field condition.
We know that SetProcess action is deprecated from workflow action.
Is there alternative to SetProcess action using workflow only.
No Javascript.
Thank You !
On deleting data source: getting error remove its entities from Map Match Merge. How to delete entities from Map Match Merge.
On deleting data source: getting error remove its entities from Map Match Merge.
How to delete entities from Map Match Merge.
Embed Webform on Contact form
The Web Page (HTML) Web Resources doc link - https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/webpage-html-web-resources - leads to a page that says: “An HTML web resource can’t contain any code that must be executed on the server. ASP.NET pages can’t be uploaded as HTML web resources.”
I take this to mean we can’t use ASP.NET pages with C# server code. However this link indicates it is possible: https://salimadamoncrm.com/2016/02/15/custom-user-interface-in-crm-html5javascript-or-asp-net-web-application/
I would much prefer using a server-side C# solution as we can re-use code rather than rewriting to a HTML5/Javascript solution. Is this possible? The contact guid needs to be passed to the webform.
Owner Assign error
Hi, In the Sales activity when we want to assign Owner to opportunity or in Services assign Owner to a case we have a Unhandled Exception: "All entities must be found"
It's not for each assign action but sometimle if we go to customer/Parent Account from Case we remove Parent Account (Empty) we add it again Save and Close
Come back to the Case and we can assign Owner.
Version 2015
Regards
Not able to activate workflow
Hi All,
One of our customer face the issue while Activate the custom workflow.
We have one managed solution, in that their is one custom workflow on account entity. So whenever user try to activate this workflow he got following error:
The Workflow (Id=906a2fab-ee03-4f41-9a06-97159188b896) entity or component has attempted to transition from an invalid state: ComponentStateName: Solution; ComponentOperation: Update; ComponentSolutionType: Solution; SolutionOperationContext: None; IsProtected: True; FinalComponentState: Publish.
Anyone have any idea regarding this issue ?
Thanks in advance.
Want to Show relation assistant card at Entity level only not dashboard level
Hello
I have requirments I want to displayrelation assistant card at Entity level only not dashboard level in crm 365
Thanks & Regards
Yash Trivedi
Is there a way to automatically display all associated Leads/Opportunities to an Account?
Hey guys,
is there a way to automatically add all associated open Leads/Opportunities to an Account Entity instead of linking them all by hand?
Interactive Dashboard Time Frame
Hi all,
Any ideas about how to add a custom Time Frame to an interactive dashboard with code ? or at least apply a custom time frame to all users once. The problem is that even if I apply a custom filter, it puts the default setting back every time that the page refresh.
Any workaround ? Javascript ? I hope that someone have found the solution since last posts (2018).
Thank you,
Khadija