question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using pyodata with old MS CRM 2015

See original GitHub issue

Hi,

Thank you for this wonderfull piece of code. pyodata can also be used successfully with MS CRM 2015 with 2 minors changes :

  • the first one is to change PATCH method by MERGE Method in service.py (MS CRM 365 is now using PATCH)
  • the second one is a small try/catch in EdmStructTypeSerializer.from_json to avoid some None result that raise an exception (At the end of this report)

Is there a way to integrate these changes in a vendor specific python file as it exists for SAP ?

Change made in def from_json(edm_type, value):

            if type_prop.name in value:
>               try:
                   result[type_prop.name] = type_prop.typ.traits.from_json(value[type_prop.name])
>               except (TypeError, AttributeError):
>                  modlog().warning(value)
        return result

This catchs the following errors in MS CRM 2015 to trap None ‘Value’ :

WARNING:pyodata.model:{'__metadata': {'type': 'Microsoft.Crm.Sdk.Data.Services.EntityReference'}, 'Id': 'f3d1cca6-0313-e711-80be-005056011e04', 'LogicalName': 'systemuser', 'Name': None} WARNING:pyodata.model:{'__metadata': {'type': 'Microsoft.Crm.Sdk.Data.Services.EntityReference'}, 'Id': None, 'LogicalName': None, 'Name': None} WARNING:pyodata.model:{'__metadata': {'type': 'Microsoft.Crm.Sdk.Data.Services.OptionSetValue'}, 'Value': None}

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:16 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
phanak-sapcommented, May 5, 2020

After merging of #102 this issue seems to be ready to be closed. @bip91 could you confirm that latest head 7972f31 works for you?

I will create release 1.5.0 soon.

1reaction
bip91commented, Apr 29, 2020

Sorry for this erroneous first feedback, with a fully new fresh installation it works like a charm. Patch is working for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Microsoft CRM 2015 and OData queries builders
Today, I was working on a brand new online instance of CRM 2015 and I trying to import a lovely tool into CRM...
Read more >
OData and OAuth on Dynamics CRM 2015 On-Prem
We are looking to access our MS Dynamics CRM 2015 on-premise data via OData. My searches all reveal the version for MS Dynamics...
Read more >
Initialization — PyOData 1.2.1 documentation
You need to split the certificate into public key, private key and certificate authority key. The following steps has been verified on Fedora...
Read more >
Libraries · OData - the Best Way to REST
OData2Poco is available in two flavours: OData2Poco. ... Microsoft.Spatial ... It's the V4 version of the former WCF Data Services Client for OData...
Read more >
Do not use the OData v2.0 endpoint - Power Apps
The Organization Data Service endpoint is also sometimes used by ... Query Microsoft Dynamics CRM 2015 data using the OData endpoint
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found