Is it possible to publish a Dynamics CRM Theme programatically ? I've tried setting the "isdefaulttheme" flag to true but this causes an exception.
I can't see an SDK message to do it - but it can be done from the CRM UI so there must be a way somehow :-)
You are looking for the PublishThemeRequest.
https://learn.microsoft.com/en-us/dotnet/api/microsoft.crm.sdk.messages.publishthemerequest?view=dynamics-general-ce-9
PublishThemeRequest request = new PublishThemeRequest();
request.Target = new EntityReference(Theme.EntityLogicalName, defTheme.Id);
service.Execute(request);
Ben's answer is perfect. You can also do the same using WebAPI if you need to:
POST /CRMORG/api/data/v8.2/themes(11111111-1111-1111-1111-111111111111)/Microsoft.Dynamics.CRM.PublishTheme()
Related
i gust curious maybe someone heard about solution how to get Report (SSRS Report) in Plugin (i want to export it in pdf from CRM and save in Sharepoint).
I have tried following solution:
https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/247210/how-to-run-the-crm-report-through-sdk?pifragment-97030=1#responses
this one is not working anymore because of authentication. I tried to authentificate my user in WebClient inside plugin but no luck. Maybe someone know how to do it
There is an excellent article/blog posted by Bob Guidinger for Generating Report and sending Email for D365 Online.
Once you get first step running, you can extend it to perform you specific operation.
Blog mentioned about Azure function and plugin (combination).
Scheduling Reports in Dynamics 365 - Part 1
I tried this for one of my project and it worked fine with me. This shall be a bit learning curve if you do not know how to create azure functions and some small parts.
Happy Coding!!
Make sure to upvote, Accept if this helps!!
I've been tasked with creating a workflow in Dynamics 365 which can send emails (the easy bit). However, the email has a link to the record (also easy using the Record URL(Dynamic) attribute). However, we use Apps in our Dynamics instance and the link generated by the workflow using Record URL(Dynamic) doesn't include the app id and so when users click the link they are taken to Dynamics but are now outside the app.
My question is, is there a supported way to appending the App Id to the Record URL(Dynamic) attribute?
I've already searched for answers to this and cant find any. My solution was to create an Action which takes as input the Record and app ID, appends them and outputs them as an output parameter. This works to be honest, but I'm wondering if I'm reinventing the wheel and there is an easier way to achieve this.
Thanks and hope this helps anyone else with the same issue.
We can get the Application ID from Xrm.Utility.getGlobalContext();
The application ID is one of the properties that returned
var globalContext = Xrm.Utility.getGlobalContext();
globalContext.getCurrentAppProperties().then(
function success(app) { console.log(app.appId); }, function errorCallback() { console.log("Error"); });
For more details refer to Here
While we are waiting for MS to give the OOB option to choose Model driven app Id & embed in Record url of WF, I recommend you to follow Andrew Butenko’s workaround using Ultimate Workflow Toolkit to achieve it with no code.
This is basically using UWT custom step to append App Id with Record url on the fly.
I'm trying to create an action in Dynamics CRM 365.
I can see it on Plugin Registration Tool (as a message), but when I'm trying to call it, it says:
Resource not found for the segment ...
then I looked it up at the Metadata and I saw that the action was created only with its prefix as new_
I tried below steps:
iisreset
crm services restart
This must be an intermittent Product issue. IISRESET or Async services restart won't help in your case.
Also you didn't mention where you checked the metadata or how/where you are calling this Action.
Btw, only for Actions, CRM is creating dupe entries in Processes. Check this in Adv.Find to verify if you have multiple versions of same Action.
Do these steps:
1. Check the exact Schema name (new_DeleteThisAction or whatever case sensitive name) & call it in webapi, this should work
2. Idenify the dupes if any & delete it
3. Please deactivate/delete the action & activate/create it again if nothing above helps
The question is the following:
I have a custom Requester field in TFS work items. It contains a valid TFS user name.
Is it possible to send an email to the person specified in this custom field, when the item changes a state?
In other words:
Requester = [Me]
Send email on State change
From the following questions :
1) “[Me]” variable for custom field alerts in TFS 2013
2) How to create custom Field with transition workflow in TFS
I figured out that custom fields (such as Requester) do not have = and <> operators. They have only Change, Change to, Change from. Thus it is not possible. (You can only observe the changes made to the custom fields)
Has anybody seen, herd or implemented a solution to this? Maybe a custom plug-in?
Thank You in advance!
You're looking at a server side event handler to achieve this.
Intercept the Work Item changed event
Check if the change was a
change in state
If it is, then email the address listed in the
Requester field.
There are couple of old projects on codeplex which should get you up and running but you'll need to update for TFS 2015 (and test with any updates you apply later)
Email alerts for TFS
TFS Work Item Watcher
There is a feature that just popped into VSTS that makes this a little slicker
Follow a Work Item
Although you would get notified on all changes rather than just state change
The feature was added in TFS "15" (not the same as TFS2015, see Brian Harry's blog post)
The feature is not enabled publicly yet, but there is a feature flag that you can turn on by changing a value in the team foundation registry to enable it - because it's not public yet you will have to contact Microsoft for instructions,
I have provided my email in the blog post
https://blogs.msdn.microsoft.com/rihamselim/2016/09/07/enabling-alerts-for-custom-fields-in-work-item-alerts/
We are using the Advanced Developer Extension against Dynamics CRM 4.0. We have generated the entities and the Xrm context using CrmSvcUtil.
What we need to do is disable the built in caching that the context uses as it is returning incorrect results, but I've been unable to find out how to do this - any ideas ?
Thanks
Matt
Take a look at these links
http://arens.ws/wordpress/?p=54
http://community.adxstudio.com/Default.aspx?DN=d589dc6c-b2bf-4ae1-a8ca-06ac55f2a177&topic=40f3987f-9600-4a75-84f8-1dcffcfbd875&page=1
http://msdn.microsoft.com/en-us/library/gg398020.aspx
Ok - found the answer at this site
CacheManager.GetBaseCache().Remove("adxdependency:crm:entity:[entityschemaname]");
Obviously replace [entityschemaname] with the schema name of the entity that you want to remove from the cache :-)