Get parent objects related records on New page?

Posted by ByronB on 15-Jan-2015 05:54

Hi, I am trying to recieve the related records of a parent object on change of a field. So when they select an Account the divisions will filter by said account. This is all on a New page, I have tried the following:

var RelAccount = form.contactAccount.value;

rbf_selectQuery("SELECT accountDivisions#id FROM account WHERE id=" + RelAccount, 10, function res(values)

This returns a null value...

Then I tried this to get the populated related values from the select list::

//alert($('#contactDivision option').length);
var items = $('#contactDivision option').length; alert(items);

The problem with the above code is it gets the previous value, it doesnt wait for the new select options to be loaded.

All Replies

Posted by ByronB on 15-Jan-2015 06:26

Resolved thanks

Posted by pvorobie on 15-Jan-2015 12:24

Please try to debug your query first using Query Debugger.

This thread is closed