FetchXML RRS feed

  • Question


    I have a validation of the field phone, ie not allow the same phone number is registered more than .For this validation check if the phone number already exists, but I let the inclusion of this  ..My problem is as follows: This consultation only validates the phone to the user loger.I woud like returns all records 
    select * from contacts 
    this  fetch returns only those records that were included by the user logged

    var FetchXML = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='true'>" +

    "<entity name='contact'><attribute name='fullname'/><attribute name='telephone1'/><attribute name='contactid'/>" +

    "<order attribute='fullname' descending='false'/><filter type='and'>" +

    "<condition attribute='telephone1' operator='eq' value='"+searchValue+"'/></filter>" +

    " <link-entity name='systemuser' from='systemuserid' to='owninguser' visible='false' link-type='outer' alias='contactowningusersystemusersystemuserid'>" +

    "<attribute name='fullname'/></link-entity></entity></fetch>"

    Monday, October 20, 2008 5:59 PM