Skip to Content
author's profile photo Former Member
Former Member

Messages object

Hi,

I am trying to send a message through the DI API 2004 and i get the following error "No addressee selected for alert". With the 6.5 API everything worked fine.

Here is the code (in delphi):

Message := SBOCOmpany.GetBusinessObject(oMessages) as Messages;

Message.MessageText := 'Text';

Message.Subject := 'Subject';

Message.Recipients.Add;

Message.Recipients.SetCurrentLine(0);

Message.Recipients.UserCode := 'user';

Message.Recipients.UserType := rt_RandomUser;

Message.Recipients.SendInternal := Tyes;

If Message.Add <> 0 Then

...............

Anybody ideas?

Thanks,

Paul

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jan 27, 2005 at 09:35 AM

    I have the same behaviour as you for rt_RandomUser.

    I have made it work setting the UserCode to a user of Business One and UserType rt_InternalUser.

    Have you already created a message into the Service Market Place? I think you should do it.

    Please update this forum if you have the solution.

    Regards

    Trinidad.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Maria Trinidad MARTINEZ GEA

      Hi Trinidad,

      I changed the UserType to rt_InternalUser.

      The source code is now:

      Message := SBOCOmpany.GetBusinessObject(oMessages) as Messages;

      Message.MessageText := 'Text';

      Message.Subject := 'Subject';

      Message.Recipients.Add;

      Message.Recipients.SetCurrentLine(0);

      Message.Recipients.UserCode := 'Receipent';

      Message.Recipients.UserType := rt_InternalUser;

      Message.Recipients.SendInternal := Tyes;

      If Message.Add <> 0 Then

      ........................

      Regards,

      Paul

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.