Error in CU Notification Entry Dispatcher in Job Queue due to WordReportManager.MergeWordDocument?

notificnav
notificnav Member Posts: 4
edited 2018-02-26 in NAV Three Tier
I'm getting the following error when I try to run Notification Entry Dispatcher (Codeunit 1509) in the Job Queue:
Microsoft Dynamics NAV
---------------------------
A call to Microsoft.Dynamics.Nav.DocumentReport.WordReportManager.MergeWordDocument failed with this message:
The following URL in the Document_Url field is not valid:
http://[server]:[port]/[server instance]/WebClient?company=[company name]&page=[page]&bookmark=[bookmark]
---------------------------
OK
---------------------------

It appears to be a problem with a string linking to the company's web client being sent to MergeWordDocument.

I've read that issues could arise from non-standard characters being used in a company's name. This company's name has non-standard characters such as ó in it, as well as a period, and the company name is used in the Document_Url string.

Has anyone been able to identify and fix this error?

Best Answer

  • notificnav
    notificnav Member Posts: 4
    Answer ✓
    The only solution I could think of was to rename the company or comment the code out.

    We weren't using the web client and couldn't rename the company, so I commented that one line of code out for now.

    Maybe some sort of string replacement would work, if mapping the characters to valid input is possible.

Answers

  • notificnav
    notificnav Member Posts: 4
    edited 2018-02-26
    BTW, if anyone has had the following error:
    The length of the string is 321, but it must be less than or equal to 250 characters.
    Value: A call to Microsoft.Dynamics.Nav.DocumentReport.WordReportManager.MergeWordDocument
    failed with this message: The following URL in the Document_Url field is not valid
    

    The fix is to go to Codeunit 1509 and change the occurrences of GETLASTERRORTEXT to COPYSTR(GETLASTERRORTEXT,1,249). ☺ This doesn't fix the underlying error, but it logs it in the error log instead of stopping the job queue entry.
  • aconan
    aconan Member Posts: 1
    Hello,

    Have you solve your problem ?
    I have had the same error.

    Thks,
  • notificnav
    notificnav Member Posts: 4
    Answer ✓
    The only solution I could think of was to rename the company or comment the code out.

    We weren't using the web client and couldn't rename the company, so I commented that one line of code out for now.

    Maybe some sort of string replacement would work, if mapping the characters to valid input is possible.