Auto populate other form items based on lookup selection


  • Hi:


    I have the following fields/lookups on a contact form:

    1. Country

    2. State

    3. Region

    4. Suburb

    5. Postcode


    I have created separate ENTITIES for Country, State, Region and Suburb with each successor being a child relation.


    What I want to do, is on the form if I lookup a Suburb, how can I get the associated data ie. Postcode, Region, State & Country from the lookup to populate the fields on the form?




    segunda-feira, 25 de agosto de 2008 11:01


Todas as Respostas

  • Hi Josh,


    You can only achieve something like this with javascript AJAX call.  What you should do is to add onChange event for the Suburb.  When the Suburb has been selected, the onChange event should fire a SOAP request to MS CRM web services, base on the business requirement and return the Country, State, Retion and Postcode.  Please refer to: for details.



    segunda-feira, 25 de agosto de 2008 13:56



    Yea, So you've to fill all other lookups in ur entity page when you select a Suburb,right?

    Postcode, Region, State & Country are seperate entities which are all related to Suburb entity? Right?

    If so, If you select a Suburb,you'll get the corresponding new_Suburbid.

    and this new_Suburbid  should be Foreign key in Postcode, Region, State & Country entities.

    One simple way is to Create and publish an ASP.Net page in ISV which will execute the required queries and return(Response.Write) a string contains all the values,postcode,region,state and country.seperate them with any special char.


    In the onchange event of the suburb lookup,Using AJAX call this published page by setting input parameter as new_suburbid and get the response as the appended string.

    Then split it and populate all those fields.




    terça-feira, 26 de agosto de 2008 12:48