Hi,
I'm not sure if I understand exactly what your requirement is. I think what you are trying to do is manipulate the query attribute of the marketing list, so that under circumstances, new members are automatically added to it. And you would like to do this
in the "OnLoad" event of the marketing list entity.
I guess the problem is that you are executing your JavaScript code to update the query in the "OnLoad" event, which may well succeed, but the changes you make are not mirrored directly in the opened marketing list. My guess is that the changes only take
effect if you refresh the record in the browser. This is probably because your code is executed only after the record has been retrieved and displayed in the form.
I don't think there is a way to do this via JavaScript (well, that's not true, you could refresh the record manually in your code after updating the query, but this is an ugly solution). But you can probably accomplish this by developing a plugin that hooks
on the "Retrieve" message of the marketing list entity and edits the query attribute before retrieving and displaying the record.
Hope I could identify your problem.
Greetings,
Pavlos
Please mark this reply as answer if it helps you find a resolution to your problem.