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)

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

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