Dear experts, While trying to call GetList function in customization script, system is throwing error “No overload for method ‘GetList’ takes 4 arguments” & code is mentioned below
Starting with a trace is always a good idea and using BL tester. I would recommend you spend some time learning these tools and perhaps search this forum for examples - there are a ton. Seems like the tools guide might also be a good place to start.
I am with dan, you should probably use GetByID instead and you must pass in all 5 key’s even if the other keys are unused, pass in blank strings. The Company value will be taken care of by the Session, you dont have to worry about it.
Don’t have my stuff with me, but from memory, the Getlist call on the Adapter requires 2 arguments (I think it’s a SearchOptions and MorePages). The BO call requires what you see in the BL Tester.
Get a decompiler (JustDecompile for exemple), and have a look in the code .
My answer with tools I mentioned was kind of general. if you want to make this really easy to see the method & parameters and even have Epicor generate the code for you then use the wizard. Then you are just making slight modifications to generated code. No need to de-comp for finding this.
out MorePages is a boolean, which looks like you haven’t set, and won’t have “out” in it, that’t the type for the method, but you don’t use that when passing the parameters. (I don’t believe)
I guess I was looking for a true or false, just creating the bool with specifying the value doesn’t seem like very good practice to me, but maybe that’s industry standard?
The value (true or false) is returned from the method and not passed in.So all you are really doing is initializing the variable. The initialized value of “bool morePages;” would be false as uninitialized variables are not permitted in C#.