Getting attributes from account

Feb 8, 2013 at 1:17 PM

First, thank you for creating this feature.

I have a custom entity that I am mapping that has no lat/long info. I used advanced find to get the lat/long, and a couple of other attributes from the account record (using link-entity this worked well in advanced find), but the attributes in the map always return zero. I have attached my config.

Am I able to get the lat/long from related entities like accounts? If so, how?

<defaultMapLocation Center="36.197742, -86.778259" ZoomLevel="5" />
<nearDistanceUnit value="miles" />
<entity name="new_servicerequest" displayname="Machine Down">
  <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
    <entity name="new_servicerequest">
      <attribute name="new_customer" />
      <attribute name="new_requestdate" />
      <attribute name="new_technician" />
      <attribute name="new_serialno" />
      <attribute name="new_model" />
      <attribute name="new_manufacturer" />
      <attribute name="new_problemdescription" />
      <attribute name="new_warranty" />
      <attribute name="new_servicerequestid" />
      <attribute name="new_urgency" />
      <order attribute="new_requestdate" descending="false" />
      <filter type="and">
        <condition attribute="statecode" operator="eq" value="0" />
        <condition attribute="new_requesttype" operator="in"> 
        <condition attribute="new_problemresolved" value="0" operator="eq"/>
        <condition attribute="new_urgency" value="1" operator="eq"/>
      <link-entity name="account" alias="a_1b985cd35749e2118f73782bcb48f57d" link-type="outer" visible="false" to="new_customer" from="accountid">
          <attribute name="address2_stateorprovince"/>
          <attribute name="address2_city"/>
          <attribute name="address1_longitude"/>
          <attribute name="address1_latitude"/>
  <latitude name="address1_latitude"></latitude>
  <longitude name="address1_longitude"></longitude>
  <mapcondition text="Name: ">
    <condition attribute="new_customer" operator="like" value="%{0}%" />
    <value type="string" default=""></value>
  <mapcondition text="City: ">
    <condition attribute="address2_city" operator="like" value="%{0}%" />
    <value type="string" default=""></value>
  <mapcondition text="Model: ">
    <condition attribute="new_model" operator="like" value="%{0}%" />
    <value type="string" default=""></value>
  <mapcondition text="Serial: ">
    <condition attribute="new_serialno" operator="like" value="%{0}%" />
    <value type="string" default=""></value>
    <listitem text="Name">
      <field name="new_customer"></field>
    <listitem text="City">
      <field name="account.address2_city"></field>
    <listitem text="State">
      <field name="account.address2_stateorprovince"></field>
    <listitem text="Manufacturer">
      <field name="new_manufacturer"></field>
    <listitem text="Model">
      <field name="new_model"></field>
    <listitem text="Serial">
      <field name="new_serialno"></field>
    <listitem text="Warranty">
      <field name="new_warranty"></field>
    <listitem text="Urgency">
      <field name="new_urgency"></field>
    <listitem text="Problem">
      <field name="new_problemdescription"></field>
  <tooltip text="Visit Pushpin">
    <field name="new_customer"></field>
    <color name="red"></color>
    <zoomlevel name="10"></zoomlevel>
Feb 8, 2013 at 3:30 PM
Actually, I figured it out. If I use the link-entity alias before the lat/long it works.
Feb 8, 2013 at 4:01 PM
Can we use any of the link-entity attributes as a search (mapcondition) variable?
Feb 9, 2013 at 8:00 AM
You can use mapcondition to add link-entity conditions as well, if that's what you mean. You just need to make sure the sequence of placeholders and mapconditions is same.