web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
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.

I have the same question (0)
  • knuengy Profile Picture
    10 on at

    Thanks

  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at

    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/

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

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 137 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 57

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans