Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Suggested answer

Please Help: Unable to update SdkMessageProcessingStepImage table

(0) ShareShare
ReportReport
Posted on by 10

I am unable to update SdkMessageProcessingStepImage attribute "attributes" by code regardless I use front end (script) or back-end code (plugin). It is not issue of access permission because I still able to create new image record.
I am SysAdmin with read write access to the table:
4621.pastedimage1650210575501v1.png

Here is the error I have "An unexpected error occurred." code: 2147746326

Here is the error.raw:
{
  "_errorCode": 2147746326,
  "_errorFault": {
    "_responseXml": null,
    "_errorCode": 2147746326,
    "_innerFault": {
      "_responseXml": null,
      "_errorCode": 0,
      "_innerFault": null,
      "_callStack": null,
      "_responseText": null,
      "_annotations": null,
      "_messages": [
        "An unexpected error occurred."
      ]
    },
    "_callStack": null,
    "_responseText":
    "_annotations": {
      "@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionSourceKey": "Plugin/Microsoft.Crm.ObjectModel.SdkMessageProcessingStepImageService",
      "@Microsoft.PowerApps.CDS.ErrorDetails.ApiStepKey": <removed>,
      "@Microsoft.PowerApps.CDS.ErrorDetails.ApiDepthKey": "1",
      "@Microsoft.PowerApps.CDS.ErrorDetails.ApiActivityIdKey": <removed>
      "@Microsoft.PowerApps.CDS.ErrorDetails.ApiPluginSolutionNameKey": "System",
      "@Microsoft.PowerApps.CDS.ErrorDetails.ApiStepSolutionNameKey": "System",
      "@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionCategory": "SystemFailure",
      "@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionMessageName": "UnExpected",
      "@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionHttpStatusCode": "400",
      "@Microsoft.PowerApps.CDS.HelpLink": "">go.microsoft.com/.../
      "@Microsoft.PowerApps.CDS.InnerError.Message": "An unexpected error occurred."
    },
    "_messages": [
      "An unexpected error occurred."
    ]
  },
  "_message": "An unexpected error occurred.",
  "_exception": null,
  "_innerError": null,
  "_errorSource": 3,
  "_blockErrorReporting": false,
  "_stack": null,
  "_faultedRequestIndex": -1,
  "_clientRequestId": "-----removed-------",
  "_serverResponseId": "----removed-------",
  "_httpStatusCode": 400,
  "_retryAfter": null,
  "_date": "2022-04-17T15:18:50.000Z",
  "_isRequestTooLong": false,
  "message": "An unexpected error occurred.",
  "name": "Error",
  "stack": "No stack available.",
  "__action": {
    "source": {
      "actionType": "modernDataSource.execute.odata.async",
      "actionStack": "modernDataSource.execute.odata.async",
      "contextId": "44fdfd71-223e-4188-8bb9-b385459fbcdf"
    },
    "child": {
      "actionType": "oData.update.async",
      "actionStack": "oData.update.async",
      "contextId": "e38c6209-a6d4-4a91-a923-83cb53584209"
    }
  }
}

The code that I used to update the SdkMessageProcessingStepImage 
Xrm.WebApi.updateRecord("sdkmessageprocessingstepimage", '5c93db9d-fabc-ec11-9840-0022482af29f',{attributes:'statuscode,'}).then(
    ()=>{},
    async (er)=>{
        let json = er.raw;
        json = await JSON.parse(json);
        console.log(json.raw);
    }
);

Similarly, the code used to udpate the table in back end:
Entity imageTable  = new Entity("sdkmessageprocessingstepimage", new Guid('5c93db9d-fabc-ec11-9840-0022482af29f'));
imageTable["attributes"] = "statuscode";
service.Update(imageTable);


Thank you.

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: Please Help: Unable to update SdkMessageProcessingStepImage table

    Hi,

    You will have to map other attributes also when you are updating the Images.

    please see below code which I tried on my instance and it worked.

    Entity imageTable = new Entity("sdkmessageprocessingstepimage");

    imageTable.Id = Guid.Parse("7ab65e36-01bf-ec11-983e-6045bdad3465");

    imageTable["attributes"] = "statuscode";

    imageTable["sdkmessageprocessingstepid"]=new EntityReference("sdkmessageprocessingstep", Guid.Parse("4d3c5818-215f-ec11-8f8f-6045bda5c934"));

    imageTable["imagetype"]=new OptionSetValue(0);

    imageTable["messagepropertyname"]="Target";

    imageTable["name"]="PreImageUnique";

    imageTable["entityalias"]="PreImageUnique";

    crmSvc.Update(imageTable);

    docs.microsoft.com/.../sdkmessageprocessingstepimage

    imagetype -> 0 -> Preimage

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

  • knuengy Profile Picture
    knuengy 10 on at
    RE: Please Help: Unable to update SdkMessageProcessingStepImage table

    Thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,359 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans