Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

PriceListService throws exception CustAccount is not a field in data source SalesPrice

Posted on by 300

I have setup the PriceListService webservice on an inbound port. 

I have the following c# code calling it.

            PriceListServiceClient client = new PriceListServiceClient();
            CriteriaElement[] criteriaElement = new CriteriaElement[1];
            criteriaElement[0] = new CriteriaElement();
            criteriaElement[0].DataSourceName = "SalesPrice";
            criteriaElement[0].FieldName = "CustAccount";
            criteriaElement[0].Operator = Operator.Equal;
            criteriaElement[0].Value1 = "9100";
            QueryCriteria queryCriteria = new QueryCriteria();
            queryCriteria.CriteriaElement = criteriaElement;
            CallContext callContext = new CallContext();

            var found = client.find(callContext, queryCriteria);
            client.Close();

When calling the service I get the exception "CustAccount is not a field in data source SalesPrice" which is very strange because when I look at the AOT it is a field in SalesPrice.

salesPrice1.PNG

Any ideas what's going on, or directions on how to debug this service would be appreciated

*This post is locked for comments

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans