This is a great question/approach but I don't think you can do this but I want to explore why you want to do this.
I am guessing that you want to initiate a specific sync PROCESS via button click. Since the DoSync button action is specific to a PROFILE, this would not work. The best advice is to create a new PROFILE and only add the one sync PROCESS to that profile if you want to isolate a single sync process to a single button.
Thanks Dan. The reason I was asking is... I am using TP for inventory management in a group of 7 liquor retail stores. Each store uses its own database and no databases are shared. Therefore it requires me to have 3 profiles setup per store. It also is requiring me to have a different TP app for each store in order to reflect the correct database. Maybe I am missing something?
Gotcha. So a few things I can think of that may help (or get you closer).
1. You could keep TP connect the way it is with 3 profiles per store for a total of 21 profiles but make a change on the TP Desktop side so that you only have to maintain/use 1 TP Desktop project. There might be a couple of ways to do this but one that comes to mins is if the end user is asked to select the store to use (or you could make this decision automatically based on his username). In either case, if you know the store you want to use, you can use that value to make form logic decisions to show and/or hide 3 of 21 total sync buttons. This could be done with a form logic entry on FormInitialize that performs an action of "SetVisible" so that only the 3 buttons related to the 3 profiles for the selected store are available for use.
2. A second option would involve having 1 unique instance of TP Connect per store so that the server currently hosting ONE instance of TP Connect could actually host 7 instances and each of those would only have 3 profiles each, This requires some config settings on the TP COnnect side but I figured I would let you know in case that is an option that could work.
3. As another possible option... Could you have TracerPlus syncing to some type of temporary database/table that then invokes a stored procedure and in the stored procedure, it could decide which store DB to post to. This requires some logic on the Database side and that may not be avaiable to you but something along these lines could be another option
Thanks Dan! 3 awesome suggestions! I like option 1 as I am already using some elements of it such as specific store login. I didnt realize that I could use formlogic to make buttons appear/disappear. Would be very easy to implement. I also didnt know I could have multiple TP Connect instances running Thank you for the follow up! Very much appreciated.