Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Retrieve a record from msdyn_customerasset based on custom field

(0) ShareShare
ReportReport
Posted on by 30

Hi,

We have added a custom field "ipaddress" in entity msdyn_customerasset.

I'm trying to retrieve a record using-

{{url}}/api/data/v9.0/msdyn_customerassets(ipaddress='10.10.10.10')

But this gives me following error-

{
    "error": {
        "code": "0x8006088a",
        "message": "Bad Request - Error in query syntax.",
        "innererror": {
            "message": "Bad Request - Error in query syntax.",
            "type": "Microsoft.OData.ODataException",
            "stacktrace": "   at Microsoft.OData.UriParser.ODataUriResolver.ResolveKeys(IEdmEntityType type, IDictionary`2 namedValues, Func`3 convertFunc)\r\n   at Microsoft.OData.UriParser.AlternateKeysODataUriResolver.ResolveKeys(IEdmEntityType type, IDictionary`2 namedValues, Func`3 convertFunc)\r\n   at Microsoft.OData.UriParser.SegmentArgumentParser.TryConvertValues(IEdmEntityType targetEntityType, IEnumerable`1& keyPairs, ODataUriResolver resolver)\r\n   at Microsoft.OData.UriParser.SegmentKeyHandler.CreateKeySegment(ODataPathSegment segment, KeySegment previousKeySegment, SegmentArgumentParser key, ODataUriResolver resolver)\r\n   at Microsoft.OData.UriParser.SegmentKeyHandler.TryCreateKeySegmentFromParentheses(ODataPathSegment previous, KeySegment previousKeySegment, String parenthesisExpression, ODataUriResolver resolver, ODataPathSegment& keySegment, Boolean enableUriTemplateParsing)\r\n   at Microsoft.OData.UriParser.ODataPathParser.TryBindKeyFromParentheses(String parenthesesSection)\r\n   at Microsoft.OData.UriParser.ODataPathParser.TryCreateSegmentForNavigationSource(String identifier, String parenthesisExpression)\r\n   at Microsoft.OData.UriParser.ODataPathParser.CreateFirstSegment(String segmentText)\r\n   at Microsoft.OData.UriParser.ODataPathParser.ParsePath(ICollection`1 segments)\r\n   at Microsoft.OData.UriParser.ODataPathFactory.BindPath(ICollection`1 segments, ODataUriParserConfiguration configuration)\r\n   at Microsoft.OData.UriParser.ODataUriParser.Initialize()\r\n   at System.Web.OData.Routing.DefaultODataPathHandler.Parse(String serviceRoot, String odataPath, IServiceProvider requestContainer, Boolean template)\r\n   at System.Web.OData.Routing.DefaultODataPathHandler.Parse(String serviceRoot, String odataPath, IServiceProvider requestContainer)\r\n   at Microsoft.Crm.Extensibility.ODataV4.Routing.CrmODataPathHandler.Parse(String serviceRoot, String odataPath, IServiceProvider requestContainer)"
        }
    }
}


*This post is locked for comments

  • RaviKashyap Profile Picture
    55,410 Moderator on at
    RE: Retrieve a record from msdyn_customerasset based on custom field

    Sorry the correct URL: {URL}/api/data/v8.2/msdyn_customerassets?$select=msdyn_name&$filter=new_ipaddress%20eq%20%2710.10.10.10%27

  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at
    RE: Retrieve a record from msdyn_customerasset based on custom field

    Hi

    I think this is the correct syntax of retrieving the field value using Web API. Try below:

    crmorgname.crm6.dynamics.com/.../msdyn_customerassets$select=msdyn_name&$filter=new_ipaddress eq '10.10.10.10'

    I would also suggest you to use CRM Rest Builder tool to build the WEB API request. This is the easiest way to build the query as well as execute it and see the results.

    carldesouza.com/dynamics-crm-rest-builder

    You can download the tool here- github.com/.../releases

    Hope this helps.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
dkrishna Profile Picture

dkrishna 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans