Error When Creating Record from Related Entity - dynamics-crm-2011

I have a custom entity related to Account.
When I create a record of the custom entity from the Account an error message is shown:
Error
An error has occurred....
If this continues, contact your system administrator.
There is no problem creating the record from the entity itself.
There is a JavaScript function registered on-save of the custom entity that prevents the save if the record is a duplicate.
Why does the create/update not work from the related Account?

Although I agree with #PedroAzevedo's idea to turn tracing on, I disagree with his method because the CRM Diagnostic tool is a lot easier: http://crmdiagtool2011.codeplex.com
I'd also check for a plugin registered on the update of the Account Entity. It may be failing there, which would account for why it does work on the entity form itself...

Active the trace and see full error description. Another thing you can check is the security role, if you have permissions for the action AppendTo at Account.

The problems is IE 10. I installed Windows 8 last night and do not yet have update rollup 12 installed.
The same error occurs when I try to add a contact to the Account.

Related

Azure AD users are no longer deactivated when removed from assigned users

We created an application with SCIM support over two year ago now and it always worked fine. However recently we have been getting reports from customers that users were no longer deleted/disabled from the target enterprise application.
I already saw there was another question like this one a few years back but that seems resolved and this seems like another issue.
We did a little research on our own and noticed that azure is not sending any requests at all when we remove a user from the assigned user list. We checked the incoming logs from our application and IIS logging and both do not show any requests are sent our way. (we do get logs from POST/GET/PUT of other provisioning related tasks, like creating a user).
In azure audit logs we do see the following:
Remove app role assignment from user
Add a deletion-marked app role assignment grant to user as part of link removal
Which seems to me that azure is doing something, it's just not sending it to the targeted application
Current situation:
We have user A that was created in azure ad and is assigned to our application. Provisioning configuration was done by means of SCIM in azure. And the user is also created in our application, so the connection seems fine.
When I remove the user from the assigned user list in our enterprise application, I expected that counts as a softdelete, causing Azure to sent a PATCH or a PUT to set the active property of the user to false. In case I would delete them entirely from AD I expected them to be removed with the DELETE. I read that it takes up to 30 days which is no problem, but the problem is that user that are no longer assigned are still active in the target application, which is no good.
I have some basic properties mapped on the user and the one thing that might be involved with this issue would be the Not([IsSoftDeleted]) mapping which is mapped to our active property. I don't see how that is wrong, but that's all I can think of at this point.
Anyone that can has any idea what is going here?
Thanks!
I have had contact with Microsoft regarding this issue and it seems to be a bug on their end which they are currently correcting. It is part of a larger set of bugfixes all regarding similar issues so they could not give me a specific time when this specific issue was resolved, but they think around the 10th of July (2020).
In any case, as this was a bug due to changes pushed by MS this is no longer an issue to be solved.
Update:
I have received some replies that a few bugs were fixed connected to this issue but not all. I'm currently on vacation so i'm not sure if the main issue is fixed as well. They did promise a fix fast though.
For now all I can give you is a workaround. The issue happens when the only change that is happening is the unassignment of users, it simple won't execute this until at least 1 property from an assigned user is also changed. When anything is changed, it will fix all unassignments and disable them all, even if the unassignment was in a different sync cycle. So until the actual fix is pushed, that might be helpful to know.
I will keep this thread updated if I get more information.
Ps: The Azure team requested that if anyone else also ran into this issue they report it through Azure. Their dev team will see if your problem matches up with my issue or if it's something new. So please do that as well.

Dynamics CRM suppress record unavailable exception

Is there a way to suppress/handle the "Record Unavailable" exception using a plugin/JavaScript. When a user tries to open a record that no longer exists,
I want implement a custom process to proceed. We are using Dynamics CRM 365.
Thanks in advance
Implemented a workaround using a similar approach outlined in this article. Essentially, I check to see if the record exists in the retrieve message and then trigger a custom action if it did does not exist anymore i.e recreate the record.
https://ameedsheikh.wordpress.com/2015/08/24/integrate-lob-data-details-in-crm-without-loading-large-data-volumes/#comment-178

You don't have sufficient privileges to open lookup dialog box error in CRM Online 2016

I have exported a solution from one of my existing CRM Online instance, and imported to another new instance which is also CRM Online 2016.
The solution contains customized Opportunity entity (forms, views, fields, processes, etc), and a custom Security role.
The solution contains one custom field "Follow up Contact" which is of lookup type and referencing to Users entity.
After importing the solution, I have assigned one of the user to the custom security role in new instance.
Now, when I try to create a new opportunity, and try selecting "Follow up Contact", I am seeing no user in the list, whereas the associated view is expected to display at least 5 users. Also, when I try clicking on "Look for more records", I get following error -
"You do not have sufficient privileges to open this Lookup dialog box."
Whereas, users with same security role in the source solution can see the items in the "Follow up Contact" dropdown, and also that "Look for more records", work fine for them.
Any idea what could be the possible reason? Are there any changes in terms of security roles in latest upgrade of CRM Online?
Well strange things do happen!!
I opened the form in designer mode.. disabled the execution of the particular method which contains scripts for setting default value to the lookup control.
Published the solution.
Then again, enabled the script execution...
and to my surprise, the lookup field started working...
Just had this problem and here is what worked for us.
We had a custom entity that was related to the out-of-the-box Account entity. We had 3 lookups on that custom entity to Account. Even with System Administrator role, none of our users could get any records to return from the lookup search and we got the error message specified in the title.
We ended up deleting ONE of the lookup fields (picked the one with least dependencies). We added that field and its dependencies back in. It was annoying manual process, but after this all THREE of our lookup fields were fixed.
I'm guessing the Account-Custom Entity relationship XML behind the scenes was corrupted somehow, and deleting/recreating cleaned it up.

CRM 2011 - Qualify lead

Does anyone know how lead qualifying works internally?
Please, consider following scenario:
I created new lead record, so I am an owner and it was created by me of course.
I have a worflow registered on onCreate of lead, this workflow is owned by another user and it sets one field on newly created record.
So my new lead record has these lookups: Owner - me, CreatedBy - me, ModifiedBy - another user.
If I want now to Qualify a lead, I check the Account and Opprtunity checkboxes in Qualify lead dialog and hit OK, then I have got missing privillege record (create Opportunity).
My user has User privillege on Create of Opportunity.
CRM wants to use ModifiedBy user as owner and creator for new Opportunity record, it is the only explanation.
So my another question is whether someone knows whether this is an OOB behavior of CRM or there is plugin or something in my organization I am working on. (I did not find such a plugin or workflow or script).
Thanks for all your answers.
the owner of the lead should become the owner of the opportunity. Try giving bu permissions over opportunity.

AddMembersTeamRequest in Plugin - Privilege Delay

This is Dynamics CRM 2011 Rollup 11 On-Premises with SQL 2008 R2
Have the following scenario that we're trying to debug:
In a Synchronous PostCreate plugin we add users to a Team that owns a specific record and has read permission on that record via a security role. That should mean that when the Create process is completed the users added to the Team have access to the record. When such a user then goes to open the record they get a SecurityException ReadAccess error. The record does show in grids, which should not happen if they do not have Read permission on the record.
As a further test we execute the SDK call RetrievePrincipalAccessRequest for the user and record, from a console application, and see that the user does not have Read permission.
We can look a the Team Member list in the UI and user is a member of the Team. If we wait long enough (and create another record the issue will eventually resolve itself - several minutes later.)
We can add a user to the team, using the same code we executed in our Plugin (but running in a console app), and the user has Read permissions and can access the record immediately after the call completes.
There is clearly something going on in our Plugin that is causing an issue but we cannot figure out what or why - since the Create call completes without error and we can see the user listed in the UI. We are not doing anything funky - i.e., direct SQL, external service, etc.
We call a standard CRM 2011 SDK message and it completes without throwing an error. We can validate that the user was added in the user interface. The user have permission to Read the entity but they do not.
Any thoughts/ideas?? We've been tracking like crazy but haven't found our smoking gun!
UPDATE
We can reduce the incidence if you we put a pause in our plug-in code. This error only occurs when the add is done during a plug-in, not when it is done outside the plug-in. I'm starting to wonder if there is a SQL procedure/statement (there are three stored procs that fire when a user is added to a team) that gets cut short or fails to complete, for one reason or another, since the add is successful when not done in plug-in code.
Finally found the answer in the list of items resolved by Rollup 18 (http://support.microsoft.com/kb/2958724)
If You are assigning Team Membership via plugin, the user Cache does
not get invalidated, causing an error when trying to retrieve a
record. The issue occurs if the Team is has a security role and Access
Rights are controlled via Team ownership.
We had opened a ticket about 2 months ago with Microsoft which had involved a lot of back-and-forth but not a definitive fix.
So if you experience the same issue on CRM 2011 you need to update to Rollup 18.

Resources