Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

How to pass Var type variable to liquid fetch in CRM portals

(0) ShareShare
ReportReport
Posted on by 85

Hi All,

Is there a way to pass the var type variable into liquid fetch xml in dynamics crm portals? I am getting contactid into a variable and based on the contact Id I need to query some data using fetchXML. I could not achieve it with Odata feed as well, because the relationship is N:N.

Actual requirement is, we have N:N relationship on contact to have sub grid on contact entity. Now I need to query the contacts which are associated to another contact. That means I need to get the subgrid records by passing the contact id

I have to achieve this functionality in CRM portal entity forms. Kindly help me by providing your thoughts. Thanks!!

*This post is locked for comments

  • Suggested answer
    Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: How to pass Var type variable to liquid fetch in CRM portals

    Hi,

    Yes you can simply pass your variable to fetchxml like following

    //get parameter

    {% assign param=request.params['parametername'] %}

    //part of fetchXML query in linq

    <condition attribute='mesh_url' operator='eq' value='{{param}}' />

    Let me know if did not understand your requirement correctly

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,160 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,962 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans