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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

how to declare entity reference in dynamics crm Azure function code

(0) ShareShare
ReportReport
Posted on by

Hi Guys,

AnyBody know how to declare entity reference in dynamics crm azure function coding. Here i write line for declare entity reference but itshowing error. My code is

       var accountType = ((EntityReference)appl.Attributes["new_requestedroleid"]).LogicalName;

But it Showing System.colletion.generics exception error occur in that line..i don't know why it is happening..can u please tell me how to declare entity reference and get the name filed value from the lookup field record.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi Dinesh,

    There is nothing specific you need to do for Azure functions. The error (if I am not wrong) must be key error which means the object appl doesn't have the attribute with the name "new_requestedroleid".

    Hope this helps.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans