locked
Error Account With Id = b3d21b73-9042-e511-80e7-c4346bac7dac Does Not Exist RRS feed

  • Question

  • Hi

    We have integrated dynamics crm with our webapp in c#. It is working fine for all dynamics customers who are using our app.But for one customer we are facing an issue while creating activity back to dynamics. The issue is given below :

    Account With Id = b3d21b73-9042-e511-80e7-c4346bac7dac Does Not Exist

    Please let me know solution for this.

    Below is the come for same :

     Entity phoneCallCreate = new Entity("phonecall");

    EntityReference toEntityRef = new EntityReference();
               toEntityRef.LogicalName = crmContact.Contact.CrmObject;
                toEntityRef.Id = new Guid(crmContact.Contact.CrmId);
                Entity toParty = new Entity();
                toParty["partyid"] = toEntityRef;
                toParty.LogicalName = "activityparty";
                EntityCollection toCollection = new EntityCollection();
                toCollection.Entities.Add(toParty);

                // assign sender to phonecall activity. sender is the crm owner of the phonecall activity associated to lead/contact
                EntityReference fromEntityRef = new EntityReference();
                fromEntityRef.LogicalName = "systemuser";
                fromEntityRef.Id = new Guid(_casUser.CrmUserId);
                Entity fromParty = new Entity();
                fromParty["partyid"] = fromEntityRef;
                fromParty.LogicalName = "activityparty";
                EntityCollection fromCollection = new EntityCollection();
                fromCollection.Entities.Add(fromParty);

                phoneCallCreate["from"] = fromCollection;
                phoneCallCreate["to"] = toCollection;
                phoneCallCreate["ownerid"] = new EntityReference("systemuser", new Guid(_casUser.CrmUserId));
                //_dynamicsCRM.Execute(activityRequest);//verify update/insert successfully happened in dynamics and assign to success
                reqCreate.Target = phoneCallCreate;

    CreateResponse resp = (CreateResponse)_serviceProxy.Execute(reqCreate);

    Here resp is coming null and giving above error.


    • Edited by ankit810 Friday, November 20, 2015 12:18 PM
    Friday, November 20, 2015 12:14 PM

Answers

All replies

  • crmContact.Contact is account or contact? Make sure account with above id exist in CRM.

    Is there any plugin or workflow that is firing on creation of activity?


    Friday, November 20, 2015 9:28 PM
  • If an account with this id does exist, also check if the user under which the code runs has permission to access this account

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Monday, November 23, 2015 9:46 AM
    Moderator
  • crmContact.Contact is a contact
    Monday, November 23, 2015 12:14 PM
  • The id "b3d21b73-9042-e511-80e7-c4346bac7dac" is the id of contact in dynamics but error says Account Id. User can fetch this contact from dynamics even can update few fields like Contact Rating from our webapp to dyamics but unable to create activity.

    How to check for Workflow in dynamics account?

    Monday, November 23, 2015 12:19 PM
  • The only part of you code that could specify that the id belongs to an account is this line:

    toEntityRef.LogicalName = crmContact.Contact.CrmObject

    Are you sure that crmContact.Contact.CrmObject = "contact" ? If that's not the problem, then check what plugins are registered on the activitypointer or phonecall entities


    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Monday, November 23, 2015 4:13 PM
    Moderator
  • Yes, crmContact.Contact.CrmObject can only be either lead or contact.
    Monday, November 23, 2015 4:22 PM
  • I checked the user has System Administration permission. I am not able to find any plugins for activity/phone call. Please suggest any workaround as this is highly urgent.

    Account With Id = 13c5c1e0-8b92-e511-80f2-c4346bac1a68 Does Not Exist
    Microsoft.Xrm.Sdk.OrganizationServiceFault
    http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/ExecuteOrganizationServiceFaultFault
    Error Code : -2146233087

    • Edited by ankit810 Tuesday, November 24, 2015 9:47 AM
    Tuesday, November 24, 2015 9:27 AM
  • I disabled all the plugins but it is still showing same error.
    Tuesday, November 24, 2015 11:33 AM
  • Hi,

    What happens if you replace the "toEntityRef.LogicalName = crmContact.Contact.CrmObject;" with "toEntityRef.LogicalName = "contact";"

    Or, log a lot of data, or maybe insert a lot och "if (X) throw exception..." so you see what actually happens.

    Another aproach is to make a very simple create call, and the add to it to see where it breaks.

    Regards


    Rickard Norström Developer CRM-Konsulterna
    http://www.crmkonsulterna.se
    Swedish Dynamics CRM Forum: http://www.crmforum.se
    My Blog: http://rickardnorstrom.blogspot.se

    Tuesday, November 24, 2015 1:49 PM
  • Ankit,

    Try to hard code the logical name and guid. This is just to test. 

    Does account exist in CRM with guid 13c5c1e0-8b92-e511-80f2-c4346bac1a68? Just check if anything in crm with that guid?

    Anything in transaction happening after your operation and rolled back account ex: sync workflow?

    Thanks!

    Tuesday, November 24, 2015 3:50 PM
  • Hi All

    Actually Id "13c5c1e0-8b92-e511-80f2-c4346bac1a68" is a Contact not Account. Yes, that contact exists in Dynamics. I have hardcoded the value of Id and crmContact.Contact.CrmObject but still facing same issue.

    Could this be related to dll version we are using? Currently we are using 6.0.0 version of sdk dlls(dynamics 2013) but the client is using Dynamics 2015.

    Wednesday, November 25, 2015 7:50 AM
  • The version shouldn't be an issue, you should be able to run CRM 2011 plugins on 2015.

    Can you try to shave off code to see what actually breaks? Start with an empty phonecall and then add things to it. If you hardcode the only reference that can be something dynamic and you still have an issue with account, it seems that there's more code that might break. Try to narrow it down and pinpoint which line is causing the issue.

    Regards


    Rickard Norström Developer CRM-Konsulterna
    http://www.crmkonsulterna.se
    Swedish Dynamics CRM Forum: http://www.crmforum.se
    My Blog: http://rickardnorstrom.blogspot.se

    Wednesday, November 25, 2015 9:48 AM
  • Hi

    I have created an empty phone call and I am able to create it in dynamics from my app. Here the issue is when I am giving regardingobjectid as contact id, it is trying to look for account with similar id but unable to find it and throwing exception "Account With Id =  4fc0defe-7c8f-e511-80fe-c4346baccb3c does not exist"

    Also I tried creating phonecall for a contact manually in dynamics account and it is giving same error

    Business Process Error

    Account With Id = 4fc0defe-7c8f-e511-80fe-c4346baccb3c Does Not Exist

    Wednesday, November 25, 2015 1:04 PM
  • If you get such an error it would seem that you have some sort of plugin trying to set the regarding object to an account. Are there any plugins registered for phonecall?

    Regards


    Rickard Norström Developer CRM-Konsulterna
    http://www.crmkonsulterna.se
    Swedish Dynamics CRM Forum: http://www.crmforum.se
    My Blog: http://rickardnorstrom.blogspot.se

    • Marked as answer by ankit810 Wednesday, November 25, 2015 6:06 PM
    Wednesday, November 25, 2015 1:40 PM
  • Thanks All

    It is working fine now.
    There was a workflow which was trying to set account as a regarding object everytime we were trying to create phonecall activity.
    Wednesday, November 25, 2015 6:06 PM
  • I already pointed this in my first reply. there should be plugin\workflow on phone call activity.
    • Edited by Kalim Khan Monday, November 30, 2015 8:07 PM
    Wednesday, November 25, 2015 8:57 PM