LCS BP error: Map, set, etc., should not be passed as parameter to a static method
Developer normally used Map or Set to pass as argument to the static method. Which is not recommended by LCS.
Here is the way to convert the SET or MAP to container to fix this BP warnings.
Convert SET to Container and vice versa:
In this example I have taken Worktable as example for demonstrating.
Set container2Set; //SET Class
Set setWorkHeaders = new Set (Types::Record);
//Add the marked records of worktable using for…Loop into set.
//Pack the set value into container
set2Con = setWorkHeaders.pack();
Pass this container as argument to the static method. In Static method using the Set
class, convert the CONTAINER into SET again.
container2Set = Set::create (set2Con);
Using SET enumerator, read the value from set
se = container2Set.getEnumerator();
View original post 111 more words