StyleSheet Help Needed

NormajmNormajm Member Posts: 82
Hi,

I just created my first stylesheet - a sales order merge letter - using only sales header data. When I go to an order and select "Send to", the Word document opens, but there is no Nav data in it.

How do I troubleshoot this?

stylesheetoolW11
Nav 5.0(1) on Cside

Thank you.

Comments

  • raven44raven44 Member Posts: 85
    I had a similar issue ages ago.
    I think it was something to do with my Word document OR a 'funny' character within the data that was being merged.
    A method to troubleshoot would be to individually remove the merged fields from your word document until you can eventually see your document being sent correct (at this stage, you'll know which field/area is the cause).
    Hope this helps.
  • santa100santa100 Member Posts: 8
    You have to make cahnge to codeunit 403.
    Look at this document USERGUIDEStyleSheetTool10forDynamicsNAV50v2.pdf in the section Appendix II – Changes to Codeunit 403

    Or look at the copied code from that pdf bellow
    You will need to make the following changes to Codeunit 403: In function LaunchApp add the following three local variables:
    
    StylesheetData Codeunit Style Sheet Data Management
    StylesheetSetup Record Style Sheet Setup
    StylesheetLink Record Style Sheet Link
    
    In function LaunchApp change the following code: ..... 
    EVALUATE(id,GetAttributeValue(DataXML,'Object','id')); 
    CASE id OF FORM::"Customer Card": AddCustomerLetter(DataXML); 
    FORM::"Vendor Card": AddVendorLetter(DataXML); FORM::"Contact Card": AddContactLetter(DataXML); 
    FORM::"Sales Quote": AddSalesQuote(DataXML); 
    FORM::"Sales Order": AddSalesOrder(DataXML); END; 
    
    ...... to the following: ..... 
    IF NOT StylesheetLink.GET(StylesheetID) THEN BEGIN EVALUATE(id,GetAttributeValue(DataXML,'Object','id')); 
    CASE id OF FORM::"Customer Card": AddCustomerLetter(DataXML); 
    FORM::"Vendor Card": AddVendorLetter(DataXML); 
    FORM::"Contact Card": AddContactLetter(DataXML); 
    FORM::"Sales Quote": AddSalesQuote(DataXML); 
    FORM::"Sales Order": AddSalesOrder(DataXML); END; 
    END ELSE StylesheetData.LoadStylesheetData(DataXML,StylesheetID,ApplicationXML); 
    AddLocaleInfo(DataXML); 
    IF StylesheetSetup.GET AND StylesheetSetup.Debug THEN DataXML.save(StylesheetSetup."Location for XML Data File"); .....
    
  • NormajmNormajm Member Posts: 82
    Thank you raven and santa100. Santa100, your solution was the fix. I wonder why the instructions for the tool don't specify doing that right up-front?

    Anyway, I'm on my way.
Sign In or Register to comment.