Best Practices errors

I always like to apply best practices to my code

but I am unable to solve these best practices errors

  • Display/Edit method must be defined using a type

eg public display str abc(input parameters)

  • Use a field list in the select statement of steprate, because 19%of the record data is referenced

select * from abc

join efg

where abc.i == efg.j

any solution to get rid of these errors in BP

for display function replace str by string EDT

for the select you need to limit the number of fields

Select {fieldsList} from abc

Join {fieldList} from efg

String255 did the trick …thanks for that


i am using select * from abc

join efg (i am not using from here)

where abc.i == efg.i (joining them here)

For display method you have to add BP deviation comment in the starting of the method

// BP deviation doucmented

If you have a display method without EDT, it means there is no appropriate label and help text. Do you feel that String255 helps users to understand the value? Normally you should use (or create) a type that provides better context.

The Best practice check warns you that you’re doing something what usually isn’t a good idea. Just getting rid of BP warnings without improving quality of your product means that you simply won’t be warned anymore - but the problem is still there! It would be the worst thing to do.

About select statements, imagine that you need values from 3 fields but you’re fetching 50 fields from database. That’s a lot of waste! If you just say “select ID, Name, Whatever from abc”, it will run significantly faster.