Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
 
Answered
Obtaining Current Account Objects

https://docs.q2developer.com/api_references/q2_sdk/hq/models/Account.html?highlight=xml%20shape

I'm trying to instantiate an Account object and it says I need to pass in a XML shape or kwargs element. I simply want to get the account that the user is currently on if they have multiple accounts per profile - how do I accomplish this?

Posted 3 years ago
0

Have you found a solution for this? I tried following the advice below but my self.form_fields doesnt have the field tct-ctxid, it has a tct-id but that doesnt hold any account information.

— Irene Ma   2 years ago
Votes Newest

Answers


Hello Tanner,

That object is not generally instantiated manually except for tests. In that case, just pass in You should receive a list of these in your extension from hq in self.account_list. There are many ways in python to search for an individual item in the list.

If you are building an extension that is supposed to sit inside the account details page, then on the first call to the extension you should receive the account id here: self.form_fields["tct-ctxid"]

Without knowing exactly what you are looking for, I don't know how to help you exactly. If you could describe the situation and what account you are wanting to pull then I can try and assist you better.

-Trey

Posted 3 years ago
Trey Teter
124 × 2 Administrator
123 Views
1 Answer
3 years ago
3 years ago