0

Is there a way to get the Acumatica Base URL through the business logic code?

pmfith
  • 831
  • 6
  • 24

1 Answers1

0

You can use PXInstanceHelper.HostName, it returns with your computer's name, or you can use HTTPContext from System.Web:

HttpContext.Current.Request.Url.Host + HttpContext.Current.Request.ApplicationPath;
Zoltan Febert
  • 471
  • 5
  • 9
  • I'm using a development machine with a test instance, and PXInstanceHelper.Hostname gives me: DESKTOP-7A31D1A/AcumaticaDB222110034, which is my Desktop name plus the acumatica instance name. I need the IIS URL, which in this case would be http://localhost/AcumaticaDB222110034. Still not sure how to get this... – pmfith Jul 27 '23 at 19:58