The following code snippet will allow you to check if an application with the same name is running already.
string TargetName = System.Diagnostics.Process.GetCurrentProcess().ProcessName;
System.Diagnostics.Process[] MatchingNames = System.Diagnostics.Process.GetProcessesByName(TargetName);
if (MatchingNames.Length > 1)
{
//do something for multiple processes
}
else
{
//do the regular thing for single process
}
Hello,
ReplyDeleteQuestion did you put that code under ISV folder ? cause I recieved a weird message and can not generate a pdf report, however if same code is put on another web directory outside crm it works perfectly