I'm working on a script i want to adapt into a PreSaveAction. Right now I'm just doing it in a document.ready so I can test my output. It seems I'm having an issue with my CAMLQuery portion. When I comment it out, I get data back. When it is not commented, I'm not getting my alert. I tested the CAML in U2U so I know it's working properly, but I must be doing something wrong.

A few things I notice. I guess you are not using a newer jQuery library as you are required to have single quotes on the selector rs:data (Just pointing that out as I was sure you were already aware. The next thing that I would do is modify the last part to something like this:

Weird, it just doesn't want to work as a presaveaction. I'll just proceed with it in my document.ready function as it makes the most sense to execute it when the page has loaded and not when they try to save the item.

I did wrap rs:data in single quotes. In document ready, I alert the the iC and it returns correctly. I even put alerts in the if blocks and those alert correctly. When I move this into a presaveaction, the alerts in the if block don't fire and the item is saved always.

I am not sure if I reversed my return true/false in my code as it seems backwards to me as to which one to use. One thing to just test would be to remove all the code and put in a simple alert in the presave function to be sure that it is firing. Just a thought.