cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SamConroy1
New Member

Unable to Dynamically use Customer Voice Email Templates in Flow

Hi All,

 

I have a custom entity in dynamics that triggers a flow to send out a Customer Voice Survey.

It works fine except for dynamically adding in the Survey Template. When I test it like this I get an error due to the template.

 

"statusCode": 400,
"headers": {
"Pragma": "no-cache",
"Timing-Allow-Origin": "*",
"x-ms-apihub-cached-response": "false",
"x-ms-apihub-obo": "false",
"Cache-Control": "no-cache",
"Date": "Thu, 20 Oct 2022 13:07:53 GMT",
"X-Powered-By": "ASP.NET",
"Content-Length": "2706",
"Content-Type": "application/json",
"Expires": "-1"
},
"body": {
"ErrorMessage": "Microsoft.FormsPro.Shared.Common.InvalidFormIdException: Source array was not long enough. Check srcIndex and length, and the array's lower bounds. ---> System.ArgumentException: Source array was not long enough. Check srcIndex and length, and the array's lower bounds.\r\n at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)\r\n at Microsoft.FormsPro.Shared.Common.FormIdEncoder.ExtractOrgIdAndAccountCode(String id, Guid& orgId, Guid& accountCode, String& tableId, Dictionary`2& moreInfo)\r\n --- End of inner exception stack trace ---\r\n at Microsoft.FormsPro.Shared.Common.FormIdEncoder.ExtractOrgIdAndAccountCode(String id, Guid& orgId, Guid& accountCode, String& tableId, Dictionary`2& moreInfo)\r\n at Microsoft.FormsPro.Shared.Common.FormIdEncoder.ExtractOrgIdAndAccountCode(String formId, Guid& orgId, Guid& accountCode, String& tableId, OwnerType& ownerType)\r\n at Microsoft.FormsPro.Shared.Common.FormIdEncoder.GetFormProperties(String formId)\r\n at Microsoft.FormsPro.Shared.SurveyOwnershipStore.SurveyOwnerStorageHelper.<GetLatestFormIdAsync>d__4.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.Forms.Pro.ApiFacade.Helpers.FormsApiHelper.<GetUrl>d__7.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n at Microsoft.Forms.Pro.ApiFacade.Helpers.FormsApiHelper.<FetchForms>d__12.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.Forms.Pro.ApiFacade.RequestHandlers.SendEmailsForFlowRequestHandler.<ParseRequestData>d__13.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.Forms.Pro.ApiFacade.RequestHandlers.SendEmailsForFlowRequestHandler.<DoValidate>d__12.MoveNext()"
}

 

If I remove the dynamic lookup it can't retrieve the values (It can do this fine if the project and survey are not dynamic).

SamConroy1_0-1666273626440.png

 

Any ideas where I'm going wrong?

 

Cheers all 🙂

 

1 REPLY 1
abm
Super User
Super User

Hi @SamConroy1 

 

Under the Survey dynamic mapping, are you using the 'Source Survey Identifier' field 'msfp_sourcesurveyidentifier'?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (2,588)