I got a requirement to get the current application environment and I need to pass to some other integration. Just check the below code.
public static void getEnvironmentAddr()
{
var env;
env = Microsoft.Dynamics.ApplicationPlatform.Environment.EnvironmentFactory::GetApplicationEnvironment();
Info(strFmt("%1", env.Infrastructure.FullyQualifiedDomainName));
Info(strFmt("%1", env.Infrastructure.HostUrl));// with https
}
Keep daxing!!
No comments:
Post a Comment