Thanks Michael I guess that is what the 'best practice' part of me was looking for ;) (although I dont know the performance impact of the typeId2Type and TypeId calls so not sure if its consider total best practice..) Thank you everyone for you help on this issue :) James
_____ From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Michael Fruergaard Pontoppidan Sent: Tuesday, May 20, 2008 2:55 AM To: Axapta-Knowledge-Village@yahoogroups.com Subject: RE: [Axapta-Knowledge-Village] Int64 problem Or even better: Set xyz = new Set(typeId2Type(typeid(recId)); This way you are explicit about wanting a set of recids, and thus shield yourself from implementation details of RecIDs. Thanks, Michael <http://blogs.msdn.com/mfp> http://blogs.msdn.com/mfp From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Sumit Loya Sent: 16. maj 2008 08:33 To: Axapta-Knowledge-Village@yahoogroups.com Subject: Re: [Axapta-Knowledge-Village] Int64 problem Hi James, Have you initialized ur set with Int64 or Integer. Please check that. Ur code should look like this Set xyz = new Set(Types::Int64); Regards, Sumit On Fri, May 16, 2008 at 11:51 AM, James Flavell <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> com> wrote: Can anyone help me to fix a problem in AX4.0 realted to Int64 and SETs I have some code that does the following: SET xyz; SalesLine salines; ; if (!xyz.add(saleslinerecid)) It gives an error that it was expecting an int and not an Int64 I understand the RecId is now Int64 but do not know how to get a SET object to accept it... Thanks James