Hi, How can we find which objects are used in an object(or Object Pack) through C/AL. 1>Is there a need to export that object first into txt format. 2>Is there any role of “Blob Reference” field of an object table in this matter. 3>What limitations we can face and how much far we can go. --Please suggest
There are methods to find the table number used by an object (i.e. form or codeunit) if that helps you: You need to load the blob and create a stream, then you read through the stream into integer variable until you find a certain number, the next integer after that contains the table number. IF NOT Obj.GET(ObjectType,’’,ObjectID) THEN EXIT; Obj.CALCFIELDS(“BLOB Reference”); Obj.“BLOB Reference”.CREATEINSTREAM(InStrm); CASE ObjectType OF Obj.Type::Form: CompareTo := 283173; Obj.Type::Codeunit: CompareTo := 288514; Obj.Type::Report: CompareTo := 280617; Obj.Type::Dataport: CompareTo := 282163; ELSE EXIT(0); END; WHILE (I <> CompareTo) AND (NOT InStrm.EOS) DO InStrm.READ(I); IF NOT InStrm.EOS THEN InStrm.READ(TableID); EXIT(TableID); I spent quite some time on finding out how the BLOB reference is structured.
Thanks Thomas, I havent tested your code yet but i am sure its going to help me thanks a lot.I knew to find out the table but had no idea about the other objects in blob. Thanks again