Same fieled names in different fntities

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Tim4667
    Junior Member
    • Jun 2018
    • 10

    Same fieled names in different fntities

    Hello everybody,

    we have created two new fields in different entities. These fields have the same name (e.g. fooUnit). The fields are located in the entities "product" and "QuoteItem". The field (fooUnit) from the product is written to the field of the same name (fooUnit) in the QuoteItem when it is created. As soon as we change something in the position (e.g. the quantity) the field "fooUnit" is empty.

    If we rename one of the two fields e.g. fooUnitTest everything works fine.

    Can you help me with this problem?
    Thank you very much!

    Tim
    Last edited by Tim4667; 06-13-2018, 04:20 PM.
  • yuri
    Member
    • Mar 2014
    • 8552

    #2
    Hi Tim,

    I will take a look.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • yuri
      Member
      • Mar 2014
      • 8552

      #3
      How you fill a quote item field with a value from a product? Maybe the problem is there.
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      • Tim4667
        Junior Member
        • Jun 2018
        • 10

        #4

        Thank you for the quick reply!

        We use formula to fill the field. (formula is located in QuoteItem)

        HTML Code:
        ifThen(
            entity\isNew() && product != null,
            fooUnit=product.fooUnit
        );
        But if wie rename one of the fields (e.g. fooUnitTest) and change the formula everything works:

        HTML Code:
        ifThen(
            entity\isNew() && product != null,
            fooUnitTest=product.fooUnit
        );

        Comment

        • yuri
          Member
          • Mar 2014
          • 8552

          #5
          I tried but could not reproduce. After changing the quantity the field keeps its value. Field names are identical.
          Last edited by yuri; 06-14-2018, 10:59 AM.
          If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

          Comment

          • yuri
            Member
            • Mar 2014
            • 8552

            #6
            What version of advanced pack do you have?
            If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

            Comment

            • Tim4667
              Junior Member
              • Jun 2018
              • 10

              #7
              Advanced Pack 1.29.0
              Espo 5.1.2

              Comment

              • yuri
                Member
                • Mar 2014
                • 8552

                #8
                I'd recommend upgrading to a newer version.
                If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

                Comment

                • yuri
                  Member
                  • Mar 2014
                  • 8552

                  #9
                  Quotes are improved in the latest version: https://www.espocrm.com/extensions/a...release-notes/
                  If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

                  Comment

                  • Tim4667
                    Junior Member
                    • Jun 2018
                    • 10

                    #10
                    Okay, we'll try. I'll let you know if it works.

                    Thx!

                    Comment

                    • Tim4667
                      Junior Member
                      • Jun 2018
                      • 10

                      #11
                      Now it works!

                      Thank you very much for your support!

                      Comment

                      Working...