All
I have a function that is calling Codeunit 99000770 (Where-Used Management) in order to find out which assemblies a particular component is used in. I've added a new fuction to Where-Used Management to externalize the results to my function. That new function looks like this:
CopyWhereUsed(VAR WhereUsedListCopy : TEMPORARY Record "Where-Used Line") Count : Integer
WhereUsedListCopy.COPY(WhereUsedList);
EXIT(WhereUsedListCopy.COUNT());
WhereUsedList is the existing global, temporary record variable pointing to Where-Used Line. In my calling function, I trap the result as
AssyCount := WhereUsedMgt.CopyWhereUsed(tmpWhereUsed)
IF (AssyCount > 0) THEN
BEGIN...
When I ran it through the debugger, count was returning 0 for a component I knew to be in multiple assemblies, so I went back to Where-Used Management and inserted
MESSAGE('Where Used Count %1', WhereUsedList.COUNT());
And found that there were, in fact, 1185 records in the WhereUsedList record variable.
Any ideas here? I feel like I'm missing something basic, but after looking through posts here and online, nothing's really ringing a bell. This is 5.0 SP1.
Comments
Problem solved.
this replaces the array of temporary record structure/workaround. Nice feature, this.
with best regards
Jens