Skip to Content
0
Former Member
Apr 22, 2013 at 09:52 AM

how to alert message through the sdk...

507 Views

Hi..

I want to send alert message...

After One record added in the Emp Master..

The below code i had used for sending the message..

It is not showing any error message..

but once i loged into the other user..

i am not able to getting the message..

Any reason or any changes..

Try

'''

If (pVal.FormTypeEx = "60100" And pVal.Before_Action = False And pVal.Action_Success = True And pVal.FormMode = 3 And pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) Then

oForm = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount)

Dim objMsg As SAPbobsCOM.Messages = Nothing

objMsg = ocompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oMessages)

Dim lretvel, errcode As Long

Dim errmsg As String

objMsg = ocompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oMessages)

objMsg.Subject = "Your Message Subject Here"

objMsg.MessageText = "Nothing"

objMsg.Recipients.Add()

objMsg.Recipients.SetCurrentLine(0)

objMsg.Recipients.UserCode = "Workflow"

objMsg.Recipients.NameTo = "Workflow"

objMsg.Recipients.UserType = SAPbobsCOM.BoMsgRcpTypes.rt_InternalUser

objMsg.Recipients.SendInternal = SAPbobsCOM.BoYesNoEnum.tYES

objMsg.Recipients.SendEmail = SAPbobsCOM.BoYesNoEnum.tNO

objMsg.Priority = SAPbobsCOM.BoMsgPriorities.pr_High

If lretvel <> 0 Then

ocompany.GetLastError(errcode, errmsg)

MessageBox.Show(errcode.ToString + " :: " + errmsg)

Else

MessageBox.Show("Success")

End If

'' AlertMessage("", "22", "Workflow", "Final approval - Document has been approved", "The document has been approved by all the relevant users." & Environment.NewLine & "Click the below link to open the document", "N")

End If

Catch ex As Exception

SBO_Application.MessageBox(ex.Message)

End Try