web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Empty values in AIF Read call

(0) ShareShare
ReportReport
Posted on by 105

Hello ,

I have write a C# code for reading simple list . result set showing me correct count of records in read but when i check for values its null . Please check my code 

MaterialRxdTableServiceClient proxy = new MaterialRxdNameSpace.MaterialRxdTableServiceClient();
CallContext context = new MaterialRxdNameSpace.CallContext();


AxdMaterialRxdTable MRTable = new AxdMaterialRxdTable();
MaterialRxdNameSpace.EntityKey eK = new MaterialRxdNameSpace.EntityKey();
QueryCriteria qc = new QueryCriteria();
qc.CriteriaElement = new CriteriaElement[1];
qc.CriteriaElement[0] = new CriteriaElement();
qc.CriteriaElement[0].Operator = Operator.Equal;
qc.CriteriaElement[0].FieldName = "PurchParmTableRecId";
qc.CriteriaElement[0].DataSourceName = "MaterialRxd";
qc.CriteriaElement[0].Value1 = "5637173877";



MaterialRxd.MaterialRxdNameSpace.EntityKey[] keylist = proxy.findKeys(context, qc);
context.Company = "IPA";
MRTable = proxy.read(context, keylist);

*This post is locked for comments

I have the same question (0)
  • Mea_ Profile Picture
    60,286 on at

    Why do you set  context company after find keys ?

  • CU12010241-0 Profile Picture
    105 on at

    I have just found this in some other post , can you suggest me what i am doing wrong ?

    because i am getting exact rows count in read but when i expand the records all values are null on the other hand i have only single record in table for testing purpose .

  • Mea_ Profile Picture
    60,286 on at

    I don't understand why do you do 2 things in the same time: find keys and read. Try something simple first, create entity key manually and try to do read. You can find example in next blog post www.tech.alirazazaidi.com/exploring-the-salessalesorderservice-aif-document-service-in-dynamics-ax-2012-r3

  • Suggested answer
    CU12010241-0 Profile Picture
    105 on at

    I have resolves the issue there was some problem in my query which having wrong joins .

    Thanks

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Sanhthosh.Kumar.K Profile Picture

Sanhthosh.Kumar.K 2

#2
Raed Salah Bzour Profile Picture

Raed Salah Bzour 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans