Today I’m going to cover about an issue which I faced recently when running a Power Automate to update D365 Finance and Operations. I will explain further using below scenario and give more understanding on the issue.
Let’s create a manual trigger flow to create a Sales Order Header record. If you would like to know more about how to create manual trigger flow please check my previous blog post.
Create Manually Trigger Flow as shown below. This flow will use SalesOrderHeadersV2 entity and create a record.
Let’s try to manually trigger this Power Automate flow as shown below.
And my Power Automate flow failed and get the below error message.
An error has occurred. Write failed for table row of type ‘SalesOrderHeaderV2Entity’. Infolog: Error: BOX API can’t be used from non-interactive sessions.
What is the reason for the issue. If you try to create manual record in this case in the system you will notice there is a Pop-up message for transferring the customer information.
Let’s find the setup for this prompt in Account Receivable Parameters > Sales Setup > “Prompt for customer Information”. Let’s just disable this setup for the moment and retest the Power Automate flow.
And you would notice the Power Automate flow ran without an issue and you are able to proceed with creating Sales Order Header record.
The reason for the issue is that Power Automate was unable to complete the Prompt message. Therefore if we disable this setup as I have shown above then the Power Automate is successful and record will be created.
But if you want to still have the same setup for GUI and you need to by pass this prompt when you create a record via Power Automate then you would require some customization to achieve this.
Note: Idea about taking this scenario is to show case this error message and to show the reason for it.
Thanks for reading this blog post and I will meet you with the next post.