Visual Studio 2013 Workflow: Failed to translate expression because of the following error: Translating the method or one of its overloads to an activity is not supported

Published May 01 2019 03:58 PM 104 Views
Microsoft
First published on TECHNET on Sep 10, 2014

This post is a contribution from Charls Tom, an engineer with the SharePoint Developer Support team

When you build a Visual Studio Workflow targeting SharePoint 2013, you will see this error if you are using any expression that’s not supported inside a workflow.

The reason for this is that 2013 workflows support only a very limited subset of .NET framework methods. In case you really need to so some operations that are not supported , best workaround is to implement it as a custom REST service method and call it using ( HttpSend ) where necessary.

Hope this helps!

%3CLINGO-SUB%20id%3D%22lingo-sub-509929%22%20slang%3D%22en-US%22%3EVisual%20Studio%202013%20Workflow%3A%20Failed%20to%20translate%20expression%20because%20of%20the%20following%20error%3A%20Translating%20the%20method%20or%20one%20of%20its%20overloads%20to%20an%20activity%20is%20not%20supported%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-509929%22%20slang%3D%22en-US%22%3E%0A%20%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CSTRONG%3E%20First%20published%20on%20TECHNET%20on%20Sep%2010%2C%202014%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%3CP%3EThis%20post%20is%20a%20contribution%20from%20Charls%20Tom%2C%20an%20engineer%20with%20the%20SharePoint%20Developer%20Support%20team%3C%2FP%3E%0A%20%20%3CP%3EWhen%20you%20build%20a%20Visual%20Studio%20Workflow%20targeting%20SharePoint%202013%2C%20you%20will%20see%20this%20error%20if%20you%20are%20using%20any%20expression%20that%E2%80%99s%20not%20supported%20inside%20a%20workflow.%3C%2FP%3E%0A%20%20%3CP%3E%3CB%3E%20%3C%2FB%3E%3C%2FP%3E%0A%20%20%3CP%3E%3CB%3E%20%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111566iD6CB11C7F7E80FE4%22%20%2F%3E%20%3C%2FB%3E%20%3CB%3E%20%3C%2FB%3E%3C%2FP%3E%0A%20%20%3CP%3E%3CB%3E%20%3C%2FB%3E%3C%2FP%3E%0A%20%20%3CP%3EThe%20reason%20for%20this%20is%20that%202013%20workflows%20support%20only%20a%20very%20limited%20subset%20of%20.NET%20framework%20methods.%20In%20case%20you%20really%20need%20to%20so%20some%20operations%20that%20are%20not%20%3CI%3E%20supported%20%3C%2FI%3E%20%2C%20best%20workaround%20is%20to%20implement%20it%20as%20a%20custom%20REST%20service%20method%20and%20call%20it%20using%20(%20%3CA%20href%3D%22http%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Foffice%2Fdn532193(v%3Doffice.15).aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%20HttpSend%20%3C%2FA%3E%20)%20where%20necessary.%3C%2FP%3E%0A%20%20%3CP%3EHope%20this%20helps!%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%0A%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-509929%22%20slang%3D%22en-US%22%3EFirst%20published%20on%20TECHNET%20on%20Sep%2010%2C%202014%20This%20post%20is%20a%20contribution%20from%20Charls%20Tom%2C%20an%20engineer%20with%20the%20SharePoint%20Developer%20Support%20team%20When%20you%20build%20a%20Visual%20Studio%20Workflow%20targeting%20SharePoint%202013%2C%20you%20will%20see%20this%20error%20if%20you%20are%20using%20any%20expression%20that%E2%80%99s%20not%20supported%20inside%20a%20workflow.%3C%2FLINGO-TEASER%3E
Version history
Last update:
‎Aug 27 2020 03:35 PM
Updated by: