Created
February 26, 2021 06:04
-
-
Save Gerhard-ZA/5901c2365ce8f0b7fd9ff1ba885d659a to your computer and use it in GitHub Desktop.
Acumatica Field Services - Extending Appointments to connect to Power Automate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ExtAppointmentEntry : PXGraphExtension<AppointmentEntry> | |
{ | |
public static bool IsActive() { return true; } | |
public delegate IEnumerable StartAppointmentDelegate(PXAdapter adapter); | |
[PXOverride] | |
public IEnumerable StartAppointment(PXAdapter adapter, StartAppointmentDelegate baseMethod) | |
{ | |
//send request to Microsoft PowerFlow | |
var client = new RestClient("https:/***.azure.com:443/workflows/"); | |
client.Timeout = -1; | |
var request = new RestRequest(Method.PUT); | |
IRestResponse response = client.Execute(request); | |
PXTrace.WriteInformation(response.Content); | |
//Complete the base Method | |
return baseMethod(adapter); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment