by synolia

Create personalized MS Office or Open Office letters and documents from any Sugar module with one click. Define and create templates for any module and generate Office documents on any record and its related records. Great for mail merges and more!

Includes a 30 day guarantee
Try it Now

#731 - " many to one " relationchip problem

Closed Bug? created by lehnerr 5 years ago

Hi.

I have created the custom module hobby which has an manytoone relationship to contacts.
So one contact could have many hobby entries.
When I try to create a document in sugar(7.2.1) professional. And select hobby as doc_template I cannot see the relationship in the SYNO_DOC_RELATIONSHIPS field.
When I select the contact I can see the relationship for hobby.

Think there is a problem with onetomany relationship.

regards Robert

  1. synolia member avatar

    synolia Provider Affiliate

    5 years ago

    Hello,

    On the "one" side, you could use directly the field without using the "SYNO_DOC_RELATIONSHIPS" part.
    You can use the template "Var extractor" available on the documentation tabs of this add-on to identify the right field name: https://www.sugaroutfitters.com/docs/synogeneratedoc

    Best regards,

    • lehnerr member avatar

      lehnerr

      5 years ago

      Hi.
      Cannot get it work.
      I only get the name of the contact. But I need more.
      This works: [itd_diplome.itd_diplome_contacts_name]
      These don't work.
      [itd_diplome.itd_diplome_contacts_phone_mobile]
      [itd_diplome.itd_diplome_contacts_primary_address_street]

      When I run "Var extractor" I can only find these for the relationship:
      [ itd_diplome. itd_diplome_contacts_name ]
      [ itd_diplome. itd_diplome_contactscontacts_ida ]

      There are no more fields from the contact.

      regards Robert

    • synolia member avatar

      synolia Provider Affiliate

      5 years ago

      Hi

      It-is a "Relation" or a file with type "Relate"?
      Maybe something like [itd_diplome.itd_diplome_contacts.phone_mobile] could work. Could you try that?

      Best regards,

    • lehnerr member avatar

      lehnerr

      5 years ago

      It doesn't work.

      It is a relation ship    contact n:1 itd_diplome

      regards Robert

    • synolia member avatar

      synolia Provider Affiliate

      5 years ago

      Hello Robert,

      I don't understand want you want to do and you context, you started the thread by speaking of Contact and Hobbies and nous you are speaking about diplome.
      Could you provide me more information about your context?

      Bet regards,

    • lehnerr member avatar

      lehnerr

      5 years ago

      it is just the same n:1 relationship.
      should i send you the modulbuilder package?
      Robert

    • synolia member avatar

      synolia Provider Affiliate

      5 years ago

      Hi,

      You should use something like [moduleName.RelationshipName.FieldName], by consequence if you are on an it_diplome which have one contact liked by the relation itd_diplome_contacts and you have a field name phone_mobile that should work: [itd_diplome.itd_diplome_contacts.phone_mobile]
      However like mention previously you must disable spell checking and do a plain text copy.

      Best regards,

    • lehnerr member avatar

      lehnerr

      5 years ago

      No this doesn't work. Spellchecker is off.

    • synolia member avatar

      synolia Provider Affiliate

      5 years ago

      Hello,

      That should work because that work on lot of customers instance, that is very strange.
      Perhaps the better option is to use the 30 days policy from SugarOutfitters https://www.sugaroutfitters.com/docs/sugaroutfitters/100-guarantee and asking a refund.

      Best regards,

This case is public. Please leave out any sensitive information such as URLs, passwords, etc.
Saving Comment Saving Comment...

Keep up to date on the latest additions

We'll send you an email every month with handpicked add-ons, reviews, tricks and tips. Don't worry, we hate spam as much as you do.