controller.loadRecords vs foundset.loadRecords

Hi Guys,

Can someone explain the difference of loading a record from controller from loading a record from a foundset?

I was debugging a module in where data are selected from a pop-up form, upon close of the pop-up the data will be populated on the main form. I was doing the forms.[formName].foundset.loadRecords(id) but some fields on the main form are not populated.
Recently, I tried forms.[formName].controller.loadRecords(id) and it worked it.

I was hoping someone can tell me whats the diffence from the 2 approach.

Thanks

foundset.loadRecords(…) will return false and produce no changes when the foundset is either in find mode or when it is called on a related foundset with params. Was this happening in your case?
controller.loadRecords(…) will produce results in more cases as it can actually change the foundset that the form is using - when needed - based on the given arguments.

Either way, both return a boolean you can check to see if the operation was successful.