Community
Showing results for 
Search instead for 
Do you mean 
Reply

CreateHistoryComplete

Accepted Solution Solved
Copper Super Contributor
Posts: 71
Country: Canada
Accepted Solution

CreateHistoryComplete

I am having problems using createhistory complete. I want to be able to run code when a history is created. Can someone show me how to add the handler for this event and how I pass the current history into the sub. I am using vb.net.


Accepted Solutions
Solution
Accepted by topic author MattRobillard
‎09-25-2015 03:20 AM
Bronze Super Contributor
Posts: 1,231
Country: USA

Re: CreateHistoryComplete

[ Edited ]

If you right click on "createhistory" portion of the line then select "Go To Definition" you should see the parameter list.

 

addhandler actapp.actframework.histories.createhistory complete, CreatedHistory()

 

 

9-19-2013 4-27-41 PM.jpg

-- Jim Durkin

View solution in original post


All Replies
Silver Super Contributor
Posts: 2,328
Country: USA

Re: CreateHistoryComplete

Just add a handler for the CreateHistoryComplete event.  The object raising the event is the history.  Not sure if that is enough info for you.  If not let me know and I'll supply a few lines of code.  Make sure that you remove the handler for the event in the routine that handles the event and then add the handler back when you're done.  Probably not important in this particular event handling scenario but a good practice to get in the habit of.

 

Stan


If you would like to get more out of ACT! you can find an ACT! Certified Consultant near you by going to:www.act.com/acc.
-------------------------------------------------------------------------------------
Stan Smith
ACT! Certified Consultant
ADS Programming Services, Inc.
(205) 222-1661
www.adsprogramming.com
www.actwebhosting.com
Click Here to Purchase Act!
Copper Super Contributor
Posts: 71
Country: Canada

Re: CreateHistoryComplete

If you could send me a few lines to show me, adding the handler is simple but I cannot seem to pass the current history into my routine. Thanks sorry I am a newbie with this stuff.

 

addhandler actapp.actframework.histories.createhistory complete, CreatedHistory()

 

Public sub CreatedHistory( Not sure what to put here)

end sub

Solution
Accepted by topic author MattRobillard
‎09-25-2015 03:20 AM
Bronze Super Contributor
Posts: 1,231
Country: USA

Re: CreateHistoryComplete

[ Edited ]

If you right click on "createhistory" portion of the line then select "Go To Definition" you should see the parameter list.

 

addhandler actapp.actframework.histories.createhistory complete, CreatedHistory()

 

 

9-19-2013 4-27-41 PM.jpg

-- Jim Durkin

Copper Super Contributor
Posts: 71
Country: Canada

Re: CreateHistoryComplete

Excellent thanks for the help got it working!