Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Unanswered

AIF Returning List as a DataMemberAttribute on a custom data contract

Posted on by 2,650

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

  • Martin Dráb Profile Picture
    Martin Dráb 225,588 Super User on at
    RE: AIF Returning List as a DataMemberAttribute on a custom data contract

    Have you generated CIL after X++ compilation?

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

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,989 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,588 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans