Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load EntityDefinitions and RelationshipDefinitions #3

Open
RafaelCavazza opened this issue May 4, 2018 · 0 comments
Open

Load EntityDefinitions and RelationshipDefinitions #3

RafaelCavazza opened this issue May 4, 2018 · 0 comments

Comments

@RafaelCavazza
Copy link
Owner

RafaelCavazza commented May 4, 2018

Add a option to load the EntityDefinitions with Attributes and the RelationshipDefinitions.
With those loaded we can auto correct attributes names and entity relationships.

Ex. ->
entity["new_account"] is corrected to -> entity["new_Account"]

Api Links:

/api/data/v8.2/EntityDefinitions?$filter=SchemaName eq 'ENTITY_NAME' & $expand=Attributes
/api/data/v8.2/EntityDefinitions?$expand=Attributes
/api/data/v8.2/RelationshipDefinitions(SchemaName='ENTITY_SCHEMANAME')
/api/data/v8.2/RelationshipDefinitions

Ex.:

When creating a Incident with the customer field:

entity["customerid"] = new EntityReference("contact", new Guid())

Must be changed by the Api To ->

entity["customerid_contact"] = new EntityReference("contact", new Guid())

The RelationshipDefinitions contains the 'ReferencingEntityNavigationPropertyName' with the correct value

image

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

No branches or pull requests

1 participant