locked
help needed with crm fetch xml RRS feed

  • Question

  • I don't know it this is the correct forum, so please direct me to the correct one if needed

    Im creating a SSIS, using Kingsway CRM component to return records from crm to an ado record set

    If I use this fetch XML the record set is populated

    <fetch mapping='logical'>
        <entity name='new_tariff'>
            <attribute name="new_licence" /> 
            <attribute name='new_licencename'/>
            <attribute name='new_renewalmonthname'/>
            </entity>
    </fetch>

    however when I try to add in a variable I get the  query fails. I have tried to hard code a value to test but it still fails. Before I go back to the component software company, can anyone see any issue in the following query

    <fetch mapping='logical'>
        <entity name='new_tariff'>
           <attribute name="new_licence" /> 
           <attribute name='new_licencename'/>
             <filter>
              <condition attribute="new_licencename" operator="equals">
                 <value>"123123"</value>
               </condition> 
             </filter>
        </entity>
    </fetch>
    I suspect that the problem may be that new_licence is a lookup to account. The variable is a licence number in accounts. the real question would be how to I parm in a licence number so that it only pulls that record from new_tarrif?


    Dont ask me .. i dont know

    Thursday, June 12, 2014 4:47 PM

Answers

  • Hi Pete,

    I am not familiar with the Kingsway CRM component, but in terms of XML from CRM, typically your code would be formatted as follows;

    <fetch mapping='logical'>
      <entity name='new_tariff'>
        <attribute name='new_licence' />
        <attribute name='new_licencename' />
        <filter type='and'>
          <condition attribute='new_licencename' operator='eq' value='123123' />
        </filter>
      </entity>
    </fetch>

    Give that a try and see if that stops your error.

    If so I'll be happy to try help you further in moving from a static value to a variable.

    ~ Atomic Coder

    • Marked as answer by Pete Newman Sunday, June 29, 2014 4:46 PM
    Friday, June 13, 2014 2:30 AM