Question regarding Docmerge date and document URL integration

Good afternoon,

We currently want to use docmerge for creating an orderform. We used to use the PDF manager in the quotes module, this works well, but as we are reorganizing our processes we would like to use docmerge instead of the PDF manager for this. I created a docmerge Quote template using the currently existing docmerge template from Sugar: 

https://support.sugarcrm.com/files/2824d1aa-8294-11ec-82e7-02ebdbabe2e2.docx

A lot of the fields we want to use are in there, but not all. I am currently trying to implement date fields from the quote module but they don't seem to come through in DocMerge. I can put in the current date. That is no problem, but I also want to put in a date field which can be manually changed on the quotes module by the user. One field for start date and one field for end date. 

Secondly, we would like to integrate the URL linked  to the documents that belong to the opportunity after an opportunity is converted to a quote using docmerge for our finance department.

I haven't found the option to link a URL to a document in Sugar under a different module. For this I also tried to use  the related button on Sugar Logic and the dynamic elements, but I did not  find this specific function. Is there a specific code that I can use to get the URL from the attached documents to an Opportunity?

Lastly, the numbers in docmerge are shown as a price, with commas and dots. We just want the data to be clear, so without commas and dots. (Example below). In the PDF manager we see only numbers without any additions. 

Thank you in advance for your answer.


Best regards,

Maike 

Parents
  • Hi Maike, 

    I was able to use Doc Merge to populate a manually-edited date field. This is what I did: 

    1. Go to Admin > Studio > Quotes
    2. Add a new Date field and name it appropriately (I named mine "Manual Date Field")
    3. Go to Layout and add the new field to the layout and deploy changes
    4. Set the field on a quote record 
    5. Open the Doc Merge Template Assistant and choose the Quotes module, then search for desired field (e.g., Manual Date Field)
    6. Click the gear icon next to the field, configure the format as you wish, and then click "Copy to Clipboard"
    7. Paste that field into your doc merge template. Mine was pasted as "{manual_date_field_c}". 

    I'm not entirely sure if this is what you're asking about for the URL portion. I included a link to the opportunity on my doc merge result like so:

    1. Go to Admin > Studio > Quotes
    2. Add a new URL field 
    3. Click the Generate URL checkbox
    4. Set the Default Value to <your instance URL>.com/#Opportunities/ and then select "opportunity_id" from the dropdown above and click "Insert Field" so that it gets added to the end.
    5. Save this field. You do not need to put it on a layout, unless you want to check it. This field will get populated when there is an opp selected in the Opportunity Name field on the Quote record. 
    6. Again, go back to the Doc Merge Template Assistant and select the Quotes module and the new field you created. You can then paste this new field into your document template.
      Note: You can choose to format the link to have different text (e.g., "Click Here!"). But as I've said in this other Club post, there's an issue with it currently. However, there is a workaround available. If you are interested in seeing this fixed, please contact Support and ask to be added to issue 92701 to give us a better idea of who is waiting for it. 

    It looks like Doc Merge is taking the 1000s separator and decimal symbol from whatever is set in Admin > Locale: 

    I'm asking around to see if anyone knows of a way around this and will post back if I hear anything. If you'd like to file a case with Support to suggest this as a future area of improvement, you are welcome to do so!

    Let me know if any of this isn't quite what you were asking and I'll try to help!

    Lydia Manger

    Product Manager — Sugar Discover

  • Good afternoon Lydia,

    Thank you very much for your reply! I used your solutions yesterday in our instance and it works! This helped us tremendously :) 

    I am now only looking into using the quote template in Word. We are mostly working with chromebooks and Google Docs. I created the Quote in Google Docs and then converted it to a Word document. Then uploaded it in Sugar. For me this works perfectly.

    However, my coworker uses a Macbook and when he opens the exact same Docmerge template in Word, he does not see the records being filled in the table in the document. 

    I am going to try to create this exact same template in Word on a Macbook. I hope this resolves our issue. 

    Thank you again for your answer and help!

    Best regards,


    Maike Mak 

  • Hi Maike. I'm glad that my answer was helpful! That is interesting that you are noticing a difference in Word on a Macbook. I use a Macbook and haven't had an issue. If your issue persists, go ahead and start a new question on here and we can try to troubleshoot! 

    Lydia Manger

    Product Manager — Sugar Discover

  • Hi Lydia,

    Definitely I will try to figure it out and will get back if it keeps persisting. 

    I have another question about the date in Docmerge, I tried to get the date into a table in the quote form (I added a screenshot) When I put the start and end date in the table above, the data is generated in the right fields, but when I add the start and end date in the table below it, where the price is calculated, doc merge keeps hanging on "data retrieving." When I want to view the document, when it says "data retrieving', it gives the following error: {"error":"no_method","error_message":"Could not find a route with 3 elements"}

    For our finance department it is important that the start and end date of the products are on the same table. (Startdatum is startdate and einddatum is end date).

    I don't know exactly what this error means, but it seems to occur as soon as I put the start and end date in the table. 

    Thank you again in advance for your answser and help!

    Best regards,

    Maike 

  • Hi again! I think I figured it out!

    This is what I did: 

    1. Created a "Start Date" (start_date_c) and "End Date" (end_date_c) field in the Quotes module. 
    2. Added those fields to the record view layout so I could populate them manually. 
    3. Added the fields to the table from the original template like so: 
    4. This is the result:

    The trick here is noting that the table row is pulling data from the Products module (the "{#products" highlighted in the image in step 3). So in your case, Doc Merge was looking for the Start Date and End Date to be in the Products module, and I'm assuming they weren't. So we need to use "quote_name." before the field name to target the Quotes module. 

    Note that I wasn't able to use the Template Assistant for this, and I'm not sure why. Typically I would be able to use the Template Assistant to pull the format for finding, e.g., the Campaign name related to an Account by:

    1. Selecting Accounts and finding the field that relates. Clicking the link icon. 
    2. Selecting the field in the Campaigns module that I want.
    3. And finding the formatted field presented to me to copy to my clipboard. 

    But for some reason the Products module doesn't show up for me to select in Step 1, so I had to improvise and look at another module to see what to call "quote_name". My guess is this has something to do with my lack of knowledge around how Products and Product Bundles work, but I'm not entirely sure. 

    Does this solve your use case? 

    Lydia Manger

    Product Manager — Sugar Discover

  • Hi Lydia! Thank you for your answer! this fixed the issue that we were facing with the template. Thank you again for helping me out!

    Best regards,

    Maike 

Reply Children
No Data