Entity can not be publised

We have a issue with the publising of a entity.

Error Message is:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: role With Id = a7d78936-a158-48f4-b39b-5d7156350422 Does Not ExistDetail:

<OrganizationServiceFault xmlns:i=”http://www.w3.org/2001/XMLSchema-instance” xmlns=”http://schemas.microsoft.com/xrm/2011/Contracts“>

<ErrorCode>-2147220969</ErrorCode>

<ErrorDetails xmlns:d2p1=”http://schemas.datacontract.org/2004/07/System.Collections.Generic“>

<KeyValuePairOfstringanyType>

<d2p1:key>CallStack</d2p1:key>

<d2p1:value xmlns:d4p1=”http://www.w3.org/2001/XMLSchema” i:type=”d4p1:string”> at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)

at Microsoft.Crm.Extensibility.Pipeline.Execute(PipelineExecutionContext context)

at Microsoft.Crm.Extensibility.MessageProcessor.Execute(PipelineExecutionContext context)

at Microsoft.Crm.Extensibility.InternalMessageDispatcher.Execute(PipelineExecutionContext context)

at Microsoft.Crm.Extensibility.ExternalMessageDispatcher.ExecuteInternal(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, String messageName, String requestName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, ParameterCollection fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId, Guid transactionContextId, Int32 invocationSource, Nullable`1 requestId, Version endpointVersion)

at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType)

at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType)</d2p1:value>

</KeyValuePairOfstringanyType>

</ErrorDetails>

<Message>role With Id = a7d78936-a158-48f4-b39b-5d7156350422 Does Not Exist</Message>

<Timestamp>2012-09-06T12:29:43.4546231Z</Timestamp>

<InnerFault i:nil=”true” />

<TraceText i:nil=”true” />

</OrganizationServiceFault>

Scenario that created the issue:

  1. Create custom security role
  2. Create custom form
  3. Assign security role to the form
  4. Delete security role
  5. Entity will not publish

Solution:

  1. Open up the problem custom form
  2. Save as a new form
  3. Delete problem form
  4. Publish successfully

The moral of the story? – Remove a security role from the form before you delete the security role.

 

One Response to Entity can not be publised

  1. car rental auckland 22. April 2013 at 13:31 #

    Appreciating the hard work you put into your blog and detailed information you present.
    It’s good to come across a blog every once in a while that isn’t the same unwanted
    rehashed information. Great read! I’ve saved your site and I’m including your RSS
    feeds to my Google account.

Leave a Reply