fiogf49gjkf0d Ok, I found a bit of a work around for this... but I'm still having issues with it. I'm using a global variable to detect if I used the switch accounts button.
Here's my "Switch Accounts" button script on my custom form:
Sub SwitchbuttonClick(Sender) Application.BasicFunctions.DoInvoke "Lookup", "Opportunity:Sbg Managers.Act Num" Application.GlobalInfo.Add "OpenDeposit", "Y" ModalResult = MrOK End Sub
Then I added this to my Main opportunity Screen:
Sub AXFormRefresh(Sender) Dim DepOpen DepOpen = Application.GlobalInfo.Item ("OpenDeposit") If DepOpen = "Y" then Application.GlobalInfo.Add "OpenDeposit", "N" Application.basicfunctions.DoInvoke "view", "Personal:Deposits Display" End If End Sub
So I got it working now, but it only works every other time I click the button. so the first time it works as intended (The opportunity changes, then my form closes, and re-opens the my form for the new opportunity). But the second time you click the button, it just closes my form. It does not change opportunities, and does not re-open my custom form.
I tried changing the AXFormRefresh to GlobalInfo.Delete instead of Add, but this doesn't work.
Any ideas?
|