CRM 365 - Managed solution import does not remove event handlers - dynamics-crm

A form in our UAT environment contains falsely 2 event handlers on a field.
I have created a solution in DEV environment, in which I included the same form, which only has 1 event handler on the specific field.
When I imported the solution in UAT, the field continued to have 2 event handlers on it.
I tried both updating and upgrading the solution in UAT, but the field still has 2 event handlers.
I do not want to update the UAT environment in the default solution, and create an unmanaged layer in order to fix the issue.
What should I do?

The most common reason is that you have some unmanaged solution layer(s) on your form, you can check and delete it, more detail here

Related

Importing my Unmanaged Solution does not change the Account form

I have a customized Account "Main" Form in CRM.
I added a new tab, a new section, and new fields inside it.
I published all customizations before-hand, then export, then import into my test environment. I publish all in the test environment.
The Unmanaged Solution contains this form and its new fields; When I review the Form XML in the exported zip's customizations.xml file, it indeed has the new tab label, new section label, I can see the fields in the XML.
PROBLEM: But after importing and publishing into the test environment... the changes don't show up!
What I see in its place is the way that section looked BEFORE (not sure how long ago last time it was changed). It's simply not getting my latest changes.
How can an Unmanaged solution import have these issues? What else is there to check/consider? I don't think Solution Layers would cause this since it's Unmanaged, nothing stood out there anyway.
Please follow this check list, also note* with Dynamics it needs more env/info including your environment to trouble shoot, since it could be something in tandem with your env.
1. Usual Suspects in an UnManaged Solution
With yours being an UNMANAGED solution, I strongly suspect its a security permissions issue not setup/enabled in the Target environment, check your logs, you may see something like this
Try these Solution Importing steps
Import your main solution (note* without field security profiles).
Now, Publish all your customizations (note* you can enable/import the field security after this step)
Lastly, Import the second solution which would contain your field security profiles
2. Troubleshooting Checklist
To resolve/hunt down the issue, try these checklist steps
Check IIS: if you reset/restart IIS, (after define and publish your field)
Clear you client side cache: run it by
pressing Ctrl+F5
Clear you server side cache:
https://learn.microsoft.com/en-us/powerapps/maker/portals/admin/clear-server-side-cache
Are using the entity form:
Do you have the correct: entity permissions Notes & Sub Grid
https://learn.microsoft.com/en-us/powerapps/maker/portals/configure-notes
Did you add the metadata
Lastly are you using activities

Change of Status in Dynamics CRM 2016 8.1

I have written code that is supposed to help us automate some specific cases. It will create a addresstag for the customer and change the status of the case to "Address Tag Sent".
All this works as intended, but for some reason the status of the case is changed back to "New".
As you can see here there is an event called "Activate" that changes the status.
I haven't found what this event is or why it occurs. I have gone through all the Workflows we got, all processes, all code (As good as I can) and spent a good amount of time trying to google it but I still come out empty handed.
Is there someone who might know what this event is? Or maybe got any idea how to access/modify it?
'Activate' will essentially re-activate any record and put the statuscode back to the default statuscode\status reason - I am guessing your default is set to 'New'.
I would investigate in these directions:
Since “changed by” showing as “CRM migration account”, this maybe an ETL job like SSIS, or Scribe which is syncing data changes from outside integration
Maybe the same service account is used by plugin, to reset the StateCode and StatusCode on some business logic
Is there some Business process flow stages available in your form, as I see “Service stage” attribute in audit before that, there may be logics coupled with that
Verify the dependencies of statecode attribute in customizations to see any SDK steps or workflows referencing that. Check in your code repos and check with any long timers in your project for any business logics implemented in the past.

Dynamics CRM 365: action was not created properly

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

Custom Field Alert in TFS 2015

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/

Why does Dynamics CRM 2013 plugin fire twice on owner change?

I have a simple plugin for a custom entity that is set to trigger on Update of my custom entity. It is registered in the Post Operation stage. I have noticed some strange behaviour when I make changes to the Owner field of the record in addition to other standard fields (e.g. text boxes, dates etc).
The plugin fires the first time and the only attributes that come across in the image are all the regular fields. The owner field does not come across.
The plugin then fires again, but the Depth property of the context is still only one (i.e. the plugin is not getting triggered by changes made in the plugin code). In this run of the plugin, the attribute that come across is only the Owner field.
My theory is that because the owner fields are 'special', the CRM is doing two different requests - one to change the regular fields, and then another request for changing the owner via an AssignRequest. However, I cannot find any 'official' documentation for this behaviour.
Can someone explain why this is happening?
I am running Dynamcs CRM 2013 UR2
The Update event fires during the Assign event. So if an assignment takes place your plug-in will execute. The same is true for SetState - if you activate/deactivate a record an Update event takes place. These items are not documented in the SDK.
A good practice is to use Attribute Filtering on your Update plugin so it only fires for the fields it is concerned about - this will, assuming it is isn't looking at the owner related fields, avoid it firing twice. If you have logic specific to record ownership you would put it in a plugin that is registered on the Assign event.
I was not able to find official documentation about this, but I think Assign message is what you are looking for (if the entity is user-owned. See http://msdn.microsoft.com/en-us/library/gg328576.aspx. I would strongly recommend that you specify Filtering Attributes if you are registering a plugin on Update message. You could also debug your plugin and inspect MessageName property of plugin context and see what message gets triggered. I hope this helps.

Resources