Skip to content

Instantly share code, notes, and snippets.

@Gerhard-ZA
Created February 26, 2021 06:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Gerhard-ZA/5901c2365ce8f0b7fd9ff1ba885d659a to your computer and use it in GitHub Desktop.
Save Gerhard-ZA/5901c2365ce8f0b7fd9ff1ba885d659a to your computer and use it in GitHub Desktop.
Acumatica Field Services - Extending Appointments to connect to Power Automate
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