Skip to content

Commit

Permalink
Move statement back to before
Browse files Browse the repository at this point in the history
  • Loading branch information
Mai An Krause Bernt committed Aug 19, 2024
1 parent 0c7949b commit fd22a6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/XrmMockupShared/Requests/UpdateRequestHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ internal override void CheckSecurity(OrganizationRequest orgRequest, EntityRefer
internal override OrganizationResponse Execute(OrganizationRequest orgRequest, EntityReference userRef)
{
var request = MakeRequest<UpdateRequest>(orgRequest);
var settings = MockupExecutionContext.GetSettings(request);

if (request.Target.LogicalName is "incident" &&
request.Target.GetAttributeValue<OptionSetValue>("statecode").Value is 1 &&
Expand All @@ -78,7 +79,6 @@ internal override OrganizationResponse Execute(OrganizationRequest orgRequest, E
throw new FaultException("This message can not be used to set the state of incident to Resolved. In order to set state of incident to Resolved, use the CloseIncidentRequest message instead.");
}

var settings = MockupExecutionContext.GetSettings(request);
var entRef = request.Target.ToEntityReferenceWithKeyAttributes();
var row = db.GetDbRow(entRef);

Expand Down

0 comments on commit fd22a6e

Please sign in to comment.