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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

AIF Returning List as a DataMemberAttribute on a custom data contract

(0) ShareShare
ReportReport
Posted on by 2,699

Hi,

I am attempting to return a parameter as part of a custom data service contract which is of type LIST and is a list of string values.

[DataMemberAttribute('parmthisList'),
AifCollectionTypeAttribute('_list',Types::String),
AifCollectionTypeAttribute('return',Types::String)]
public List parmthisList(List _list = thisList)
{
    thisList = _List;

    return thisList;
}

Everything compiles ok but when I try to deploy the service group I get the following exception:

The service 'TestService' could not be generated.\n  Error: An attribute of type 'AifCollectionTypeAttribute' has not been defined. Method: 'BP_ResponseContract.parmthisList', Parameter: ''.

Could someone please advise what is not correct on my code and what I need to change on the service contract, calling service or indeed the structure of the parameter itself?

Thanks

I have the same question (0)
  • Martin Dráb Profile Picture
    237,882 Most Valuable Professional on at

    Have you generated CIL after X++ compilation?

    The version tag is missing for some reason, but I assume this thread is about AX 2012.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 584 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 499 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 254 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans