Send Message using Notification service  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Re: Send Message using Notification service

Postby SBarnes » Wed Feb 26, 2020 7:57 am

Hi Mike and Scott

Firstly Mike on the reported bug I don't need anything done, I was just letting you know it was there.

With regards to hyperlink not working, we were going down the wrong track in that it's in the lister screen that it's actually not working, interestingly though on the same machine and the same demo database the sales order sample included works.

What I have discovered by actually working in the plugin and launching the debugger I now know why its not working and that is because the URL coming through is

Code: Select all
{res://ieframe.dll/unknownprotocol.htm#jiwa:JiwaFinancials.Jiwa.JiwaJournalSetsUI.MainForm, b9071863d42b4a949e2d}


and the fragment is

Code: Select all
#jiwa:JiwaFinancials.Jiwa.JiwaJournalSetsUI.MainForm,%20b9071863d42b4a949e2d


Which I suppose comes back to somehow the code that is inserting the hyperlink is wrong which is where I need some help.

Below is the code that sends the todo

Code: Select all
  private void SendInternalMessage(Manager manager, List<string> toList, string string1, string string2, JournalSet oJournal)
        {
            foreach (string usr   in toList)
            {
                JiwaFinancials.Jiwa.JiwaApplication.JiwaToDos.ToDo toDo = manager.BusinessLogicFactory.CreateBusinessLogic<JiwaFinancials.Jiwa.JiwaApplication.JiwaToDos.ToDo>(null);
                toDo.CreateNew();
                toDo.AssignedTo.ReadRecordByUsername(usr);
                toDo.Subject = String.Format("Wages Journal Set {0} created.", oJournal.SetNo);

                toDo.Body = "<A id=" + oJournal.RecID + " href = \"jiwa:JiwaFinancials.Jiwa.JiwaJournalSetsUI.MainForm, " +
                    oJournal.RecID + "\"> Journal Set " + oJournal.SetNo + "</A>";



                toDo.ReminderPredefinedSetting = JiwaFinancials.Jiwa.JiwaApplication.JiwaToDos.ToDo.ReminderPredefinedSettingType.WhenDue;
                toDo.ReminderSpecificDateTime = DateTime.Now;
                toDo.ReminderEnabled = true;
                toDo.Save();
            }
        }
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1617
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Send Message using Notification service  Topic is solved

Postby Scott.Pearce » Wed Feb 26, 2020 11:31 am

Your journal set recid is invalid in the href link. Try "b9071863d42b4a949e2d" instead of " b9071863d42b4a949e2d". The space at the start matters as the URL components are split by ",".
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 742
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 221

Re: Send Message using Notification service

Postby SBarnes » Wed Feb 26, 2020 12:05 pm

Thanks Scott that fixed it.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1617
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Previous

Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 5 guests