1.7k questions

3.2k answers

1.7k comments

398 users

Categories

1.7k questions

3.2k answers

1.7k comments

398 users

0 votes

I am executing BusinessProcessLaunch from within a global change and it is working well. Now I need to execute this same function from within a console application. I am getting hung up on the RequestContext that needs to be passed into BusinessProcessLaunch. Has anyone been able to do this from outside of the CRM?

	Dim oBusinessProcessLaunchRequest As BusinessProcessLaunchRequest = New BusinessProcessLaunchRequest()
oBusinessProcessLaunchRequest.BusinessProcessID = gBusinessProcessID
oBusinessProcessLaunchRequest.ParameterSetID = gFileID
oBusinessProcessLaunchRequest.ClientAppInfo = Me.RequestContext.ClientAppInfo

Dim oBusinessProcessLaunchReply As BusinessProcessLaunchReply = ServiceMethods.BusinessProcessLaunch(oBusinessProcessLaunchRequest, Me.RequestContext)
asked by raldin (195 points)

1 Answer

0 votes

It's been a while since I've done that, but I know I've gotten it to work. Try something like this.

Dim header As New ClientAppInfoHeader()
header.ClientAppName = "My new app"
header.REDatabaseToUse = "BBInfinity"
header.TimeOutSeconds = 100
    
Dim context As New RequestContext(HttpContext.Current, header)
answered by chriswhisenhunt (3.9k points)
...