D365F&O - X++ - The first parameter of AifCollectionTypeAttribute must match either a parameter of the method it is defined on or "return".
The value in your attribute calls the parameter in method definition which is _ TestParm in our case . [DataMemberAttribute ( "TestClass" ), AifCollectionTypeAttribute( '_TestParm' , Types::Class, classStr(CustClass)), AifCollectionTypeAttribute( 'return' , Types::Class, classStr(CustClass))] public List parmTestMethod(List _TestParm = TestParm) { TestParm = _TestParm; return TestParm; }