Advice Alert causing exception

When a client has an overdrawn chequing account, my app cannot post without getting the following "advice" alert, which causes an exception.

"Your chequing account is overdrawn. See the Advice topic "Managing Your Cash Flow" for suggestions."

I looked carefully at my subclass that inherits the sdkAlert class and I can't seem to override this exception.

I looked at the MessageForSDKDevelopment property of the SimplyErrorMessageException and this is what it says:

"Error messages have not been implemented for AdviceAlert - To display Errors instead of catching exceptions, subclass from the SDKAlert class, override the AdviceAlert method, and pass the object to SDKInstanceManager.SetAlertImplementation()"

There is no method named AdviceAlert in SDKAlert. (at least that I can override...though I can see it in the Objectbrowser)

The stack trace shows:

  StackTrace "   at SimplySDK.Support.SDKAlert.AdviceAlert(SimplyMessage message, IntPtr owner)    at Simply.Domain.Journals.JournalModel.AdviceOverDrawn()    at Simply.Domain.Journals.JournalModel.TriggerAdvice()    at Simply.Domain.Journals.JournalModel.AfterJournalPosting()    at Simply.Domain.Journals.GeneralJournalModel.AfterJournalPosting()    at Simply.Domain.Journals.JournalModel.PostJournal(GridValidEventArgs e)    at SimplySDK.Support.Journal.Post()    at CPSLI.SADB.PostEntries(DataTable& dtc, DateTime PostDate, Int32& errorCount) in F:\Documents\Visual Studio 2008\Projects\CPSLI v 1.1\CPSLI\SADB.vb:line 421" String

My subclass is working for all other messages except AlertAdvice.  My only recourse (undesirable) is to use a try catch block and look at the exception ID to sort it out.

I am using:

VB environment
with 2011 SDK version dated Sept 9 2010.

 *** UPDATE ****

I discovered that I needed to alter the signature of the method to:


Even though I am using a VB environment and IntPtr is a data type that I am not familiar with, I need to include it in the signature. Who knew? :)

Overloads Overrides Sub AdviceAlert(ByVal message As SimplyMessage, ByVal owner As IntPtr)

Parents Reply Children
No Data