Recently, we were working on embedded canvas app on Contact entity form. The requirement was to show related records of the Contact record based on certain condition when the App is started.
We created the App in make.powerapps.com and created an Azure Function which will take input as GUID of Contact record and will return the related records.
We used below formula on App –> OnStart:
However, while testing it, checking the logs of Azure Function in Azure Portal, we found that ClientID is null.
Since, the input to the Azure Function was null, it was not doing any further processing and was returning null.
After spending some time on this issue, we were able to fix this issue by using a Timer control since ModelDrivenFormIntegration control is not available on App Start.
So, we used the below formula on TimerControl –> OnTimerEnd:
Below are the properties of Timer Control that we set along with the above change:
- Visible –> False
- Duration(millisecond) –> 3000
By making the above changes, we were able to pass GUID of contact record to Azure Function and were able to see the related records in the collection.
Hope it helps !!