how to check if an object exists in ms dynamics?

228 Views Asked by At

I am currently working on a crawler for ms dynamics. But, before crawling the custom object, I want to verify if an object exists in ms dynamics. I want to make an input box for the user to search for an object and only allow to crawl that object if it exists and return an error if it doesn't.

Is there any API that can accept something like the name of the object as the query parameter and returns if the object exists or not?

1

There are 1 best solutions below

0
MattB On

If by object, you mean a table or a field, yes. You would use the metadata apis to search. They are available on both the odata api and .net sdk client

https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/use-web-api-metadata

https://learn.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/retrieve-detect-changes-metadata?view=op-9-1