Posts

Showing posts with the label PowerApps

PowerApp to validate UK VAT Numbers in D365 F&O

Image
 In my last post I showed you how to create a custom connector to validate a UK VAT number to use in PowerAutomate, in this post I am going to go through how to actually use that custom connector in a PowerApp which we can imbed in D365 F&O, in future posts I will also look at other ways you can use this API for automatic validation. The first element is the flow which I am using which is pretty straight forward. We use an in PowerApps step which I am using to initialize the the only parameter required to trigger the API from HMRC using the custom connector I placed in the previous post. Then I am setting the returned VRN number as a variable. I then initialize a variable called validVRN which basically will hold the text back to the PowerApp and I do a compare too see if the VRN from the PowerApp is the same as the returned value from the API, then I set the value on the variable to either "Valid" or "Not Valid" Then because a blank value can result in a Valid ...

Custom Connector for HMRC VAT Number Validation

Image
I was scrolling through available API's on HMRC website and noticed this one which is in BETA: Check a UK VAT number - HMRC Developer Hub - GOV.UK This information would be very useful in PowerApps and also F&O, so I decided to create a custom connector around this API. To do this I went to custom connectors section in PowerApps: Then I clicked on New Custom Connector > Create from Blank. I filled in the image, Host URL and clicked Security. As this is an Open API and there is no security requirement, I just left this as is and went to the definition tab: I filled in the various pieces of information here: Then Clicked on new to create a new action for the first of the 2 available API's which is just to receive the VAT number without a reference number and then clicked on Import from Sample: Checking the HMRC documents, this is a GET, so mark as GET and then I put in the URL, the URL is a combination of the Host URL and this end point  /organisations/vat/check-vat-number...