web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

INVALID FETCH XML??

(0) ShareShare
ReportReport
Posted on by

Hi

I have just added a field to the Appointment Form, and im try to add it to a weekly activity report. The new field name is "new_nextscheduledactivity ". When I first tried to add the "new_nextscheduledactivity" to the report . It uploaded successfully and ran, but just displayed the field in a textbox not an actual value for the field?

Now I am trying to fix this error

When I upload the report to CRM, it says "INVALID FETCH XML".

My Fetch xml Code below

<fetch distinct="false" no-lock="false" mapping="logical">
	<entity name="activitypointer" enableprefiltering="1" prefilterparametername="CRM_FilteredActivityPointer">
		<attribute name="scheduledstart" alias="scheduledstart" />
		<attribute name="subject" alias="subject" />
		<attribute name="regardingobjectid" alias="regardingobjectid" />
		<attribute name="description" alias="description" />
		<attribute name="activityid" />
		<attribute name="ownerid" alias="ownerid" />
		<attribute name="activitytypecode" />
		<attribute name="actualstart" alias="actualstart" />
		<attribute name="actualdurationminutes" alias="actualdurationminutes" />
		<attribute name="actualend" alias="actualend" />
		<link-entity name="opportunity" to="regardingobjectid" from="opportunityid" link-type="outer" alias="LE_3c8631e7bcbe64b3de96e66789a47536">
			<attribute name="customerid" alias="LE_3c8631e7bcbe64b3de96e66789a47536_customerid" />
			<attribute name="schedulefollowup_qualify" alias="LE_ad91c354eb5a26b004de4d41b2c3d454_schedulefollowup_qualify" />
			<attribute name="new_accounttype" alias="LE_54d761d89ac278139a6836de7c3607db_new_accounttype" />
			<attribute name="new_neworexisiting" alias="LE_5db2d6da9e43bd44c8949cb912432cba_new_neworexisiting" />
			<attribute name="new_accaddresscomposite" alias="LE_c6b3b5d2a9364c90878a5d147b97b866_new_accaddresscomposite" />
			<attribute name="new_accaddress1" alias="LE_bde40c40dbe1d0481eb6a37468897c44_new_accaddress1" />
			<attribute name="parentaccountid" alias="LE_b7d5c9432034544323d9170db9688778_parentaccountid" /> <!-- Used for Account name-->
			<attribute name="actualclosedate" alias="LE_3d1bcadc4e9010d6d4689ded2531d68a_actualclosedate" />
		</link-entity>
		<link-entity name="account" to="regardingobjectid" from="accountid" link-type="outer" alias="LE_d08b5ac0b1b1a422353a6d092b699986" enableprefiltering="1" prefilterparametername="CRM_FilteredAccount">
			<attribute name="name" alias="LE_d08b5ac0b1b1a422353a6d092b699986_name" />
			<attribute name="address1_composite" alias="LE_b6831392115770835cce64e99a59be4a_address1_composite" />
		</link-entity>
			<link-entity name="new_visit" to="regardingobjectid" from="new_visitid" link-type="outer" alias="LE_041a4de02adecc6816a3be5b9389d9ac">
			<attribute name="new_tmpdurationmins" alias="LE_041a4de02adecc6816a3be5b9389d9ac_new_tmpdurationmins" />
			<attribute name="new_arriveddatetime" alias="LE_0238625bc02c72e091b42d4c6ece34e5_new_arriveddatetime" />
		</link-entity>
		<link-entity name="activityparty" to="activityid" from="activityid" link-type="outer" alias="activityparty1" enableprefiltering="1" prefilterparametername="CRM_FilteredActivityParty">
			<attribute name="activitypartyid" />
			<attribute name="partyidname" />
			<link-entity name="appointment" to="activityid" from="activityid" link-type="outer" alias="LE_ae14307905116a8625dda9ad0d58102e">
				<attribute name="new_nextscheduledactivity" alias="LE_ae14307905116a8625dda9ad0d58102e_new_nextscheduledactivity" />
			</link-entity>
	</entity>
</fetch>

1.What would make it display the field name , instead of a value?

2. Why is it saying "INVALID FETCH XML"?

Sorry for all the questions im very new to CRM.

Thanks

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Abed Haniyah Profile Picture
    4,287 on at

    Hello,

    By a quick checking, I found that you need to close below tag : 

    <link-entity name="activityparty" to="activityid" from="activityid" link-type="outer" alias="activityparty1" enableprefiltering="1" prefilterparametername="CRM_FilteredActivityParty">

    Just add  </link-entity>  at line 37.

    Hope this helps,

    Abed.

  • Community Member Profile Picture
    on at

    Hi Abed,

    Thanks for spotting that.

    In the text field where there should be a value it just displays "LE_ae14307905116a8625dda9ad0d58102e_new_nextscheduledactivity",

    on the actual report that was run why would this be?

    Thanks

  • Rajkumar Rajaraman Profile Picture
    on at

    To design queries that require you to join one or more tables, we make use of Link-Entity. The Link-Entity syntax requires providing of an Alias using which the values of the attributes can be accessed from the resultset. If you do not provide an explicit alias, the platform would auto generate the alias for you.

    Walkthrough the following blog. It explains deeply

    inogic.com/.../use-of-alias-in-fetchxml

    Hope this helps.

    Regards,

    R.Rajkumar

    "Please mark my answer as verified if you found it helpful"

  • Suggested answer
    Community Member Profile Picture
    on at

    Try This FETCH XML

    <fetch distinct="false" no-lock="false" mapping="logical">

    <entity name="activitypointer" enableprefiltering="1" prefilterparametername="CRM_FilteredActivityPointer">

    <attribute name="scheduledstart" alias="scheduledstart" />

    <attribute name="subject" alias="subject" />

    <attribute name="regardingobjectid" alias="regardingobjectid" />

    <attribute name="description" alias="description" />

    <attribute name="activityid" />

    <attribute name="ownerid" alias="ownerid" />

    <attribute name="activitytypecode" />

    <attribute name="actualstart" alias="actualstart" />

    <attribute name="actualdurationminutes" alias="actualdurationminutes" />

    <attribute name="actualend" alias="actualend" />

    <link-entity name="opportunity" to="regardingobjectid" from="opportunityid" link-type="outer" alias="LE_3c8631e7bcbe64b3de96e66789a47536">

    <attribute name="customerid" alias="LE_3c8631e7bcbe64b3de96e66789a47536_customerid" />

    <attribute name="schedulefollowup_qualify" alias="LE_ad91c354eb5a26b004de4d41b2c3d454_schedulefollowup_qualify" />

    <attribute name="new_accounttype" alias="LE_54d761d89ac278139a6836de7c3607db_new_accounttype" />

    <attribute name="new_neworexisiting" alias="LE_5db2d6da9e43bd44c8949cb912432cba_new_neworexisiting" />

    <attribute name="new_accaddresscomposite" alias="LE_c6b3b5d2a9364c90878a5d147b97b866_new_accaddresscomposite" />

    <attribute name="new_accaddress1" alias="LE_bde40c40dbe1d0481eb6a37468897c44_new_accaddress1" />

    <attribute name="parentaccountid" alias="LE_b7d5c9432034544323d9170db9688778_parentaccountid" />

    <!-- Used for Account name-->

    <attribute name="actualclosedate" alias="LE_3d1bcadc4e9010d6d4689ded2531d68a_actualclosedate" />

    </link-entity>

    <link-entity name="account" to="regardingobjectid" from="accountid" link-type="outer" alias="LE_d08b5ac0b1b1a422353a6d092b699986" enableprefiltering="1" prefilterparametername="CRM_FilteredAccount">

    <attribute name="name" alias="LE_d08b5ac0b1b1a422353a6d092b699986_name" />

    <attribute name="address1_composite" alias="LE_b6831392115770835cce64e99a59be4a_address1_composite" />

    </link-entity>

    <link-entity name="new_visit" to="regardingobjectid" from="new_visitid" link-type="outer" alias="LE_041a4de02adecc6816a3be5b9389d9ac">

    <attribute name="new_tmpdurationmins" alias="LE_041a4de02adecc6816a3be5b9389d9ac_new_tmpdurationmins" />

    <attribute name="new_arriveddatetime" alias="LE_0238625bc02c72e091b42d4c6ece34e5_new_arriveddatetime" />

    </link-entity>

    <link-entity name="activityparty" to="activityid" from="activityid" link-type="outer" alias="activityparty1" enableprefiltering="1" prefilterparametername="CRM_FilteredActivityParty"/>

    <attribute name="activitypartyid" />

    <attribute name="partyidname" />

    <link-entity name="appointment" to="activityid" from="activityid" link-type="outer" alias="LE_ae14307905116a8625dda9ad0d58102e">

    <attribute name="new_nextscheduledactivity" alias="LE_ae14307905116a8625dda9ad0d58102e_new_nextscheduledactivity" />

    </link-entity>

    </entity>

    </fetch>

  • Community Member Profile Picture
    on at

    Hi Raghuraj,

    What have you changed in the fetch xml?

  • Community Member Profile Picture
    on at

    <link-entity name="activityparty" to="activityid" from="activityid" link-type="outer" alias="activityparty1" enableprefiltering="1" prefilterparametername="CRM_FilteredActivityParty">

    Closed the tag of the link-entity in the above row.

  • Suggested answer
    suresh maurya Profile Picture
    630 on at

    For testing of FetchXML, you can test here online http://msxrmtools.com

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans