createAttributeMap on custom entity not populating

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PhotoMommie
    Member
    • Dec 2019
    • 50

    #1

    createAttributeMap on custom entity not populating

    I am wondering if there is some logic that is keeping this from working.
    I have a custom entity "Reseller" and I need the Invoice to pre-populate the priceBookId for that Reseller in order to apply to the invoice items.
    In Custom/Resources/metadata/clientDefs/Invoice.json I added the following:
    PHP Code:
    "cReseller": {
    "createAttributeMap": {
    "priceBookId""priceBookId",
    "billingAddress""billingAddress",
    "shippingAddress""shippingAddress"

    I rebuilt DB and cleared cache. This is still not working properly. Anyone got some ideas on this?
  • yuri
    EspoCRM product developer
    • Mar 2014
    • 9508

    #2
    Did you add it inside the relationshipPanels parameter?
    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


    • PhotoMommie
      PhotoMommie commented
      Editing a comment
      Yes, added within the relationshipPanels section.
  • yuri
    EspoCRM product developer
    • Mar 2014
    • 9508

    #3
    Something might be wrong but I'm not sure what. We have this parameter usage in many places and it works fine.
    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
      EspoCRM product developer
      • Mar 2014
      • 9508

      #4
      'billingAddress' is not an attribute but a field. You should use attributes like 'billingAddressStreet'. You can find all attributes in the entity manager > {Entity} > fields > menu on the field's row > View Details.
      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

      • PhotoMommie
        Member
        • Dec 2019
        • 50

        #5
        Is it possible that the issue is the relationship with Invoices and Price Book :: Account and the Price Book :: cReseller?
        The Invoice logic might attempt to override this automatically? I'm not sure how that works.
        I'll try to map out a test field to see if it is specifically the PriceBookId that is not carrying over.

        Comment

        Working...