Skip to content

Conversation

@suhrawardi
Copy link

Hi,

I needed to add a custom option to query a Business Central endpoint. Of course I could use the raw query method, but that made me lose the query methods and entity object initialization.
I hacked the passing of the options dict, so now I can provide the additional options and keep using the nice query methods.

Service = ODataService(url, session=session, reflect_entities=True)
Supplier = Service.entities['Clients']
options = {'company': os.getenv('COMPANY')}
query = Service.query(Supplier, options=options)

Please let me know your thoughts about this. Is this useful for others? Feedback and ideas on how to improve this PR are very welcome.

Thx, Jarra

@suhrawardi suhrawardi force-pushed the master branch 2 times, most recently from 476a60c to 9241636 Compare June 24, 2020 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant