#11 ✓resolved
Daniel Parker

Add helper methods to get and modify Extended Data on objects.

Reported by Daniel Parker | July 16th, 2009 @ 11:58 AM | in 2.0 - "Ambidextrous Octopus"

To read extended data on objects, you can get it inside the object request, but to create and update extended data, you have to use the totally separate DataExtAdd and DataExtMod elements. This is rather cumbersome, so I'm adding a couple of methods to help get the same things done, from inside the model you're working with.

Comments and changes to this ticket

  • Daniel Parker

    Daniel Parker August 1st, 2009 @ 10:56 PM

    • State changed from “new” to “open”

    Got this mostly working. I think I can make it a little easier still...

  • Daniel Parker

    Daniel Parker August 5th, 2009 @ 02:16 PM

    • State changed from “open” to “resolved”

    Made it easier to use:

    QB::Customer.first(:IncludeDataExt => true) # => Includes extended data under the default owner '0'. Change true to a value if you need a different owner.

    customer = QB::Customer.first
    customer.load_extended_data # => Loads extended data into customer for the default owner '0'. Accepts one argument if you want to specify a different owner.

    customer.update_extended_data(key, value) # => Modifies extended data key with a new value, for the default owner '0'. Add another argument if you need to specify a different owner.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Shared Ticket Bins

People watching this ticket

Tags

Pages