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)

CRM API C# - Accessing Form OnSave, On Update , Attribute onChange events in wpf desktop application

(0) ShareShare
ReportReport
Posted on by

Hi

I have a desktop wpf application and working with CRM API's.

I could fetch all custom entities from our CRM.

But I wanted to know any entity record created or modified.

Is there any event exposed for such entity that to whome I will get subscribe and stay tuned for such record creation and modification? Please suggest any sample code or dlls if any.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Temmy Wahyu Raharjo Profile Picture
    2,916 on at

    Hi, in your entity. You can add event to call your service on any event you want. So everytime user do CRUD, your service will be called to do any operation you want.

  • Community Member Profile Picture
    on at

    Does that mean, I have to do changes in CRM ? Actually we don't have rights to do changes in CRM..

    Is this not possible just by using crm c# APIs ?

  • Suggested answer
    unizap Profile Picture
    on at

    Hi,

    You can use Microsoft Flow. Flow has triggers like CRM record create, update.

    Read more here :

    [View:https://docs.microsoft.com/en-us/flow/connection-dynamics365#create-a-task-from-a-lead]

    For complex implementation go for logic apps:

    [View:https://docs.microsoft.com/en-us/azure/connectors/connectors-create-api-crmonline]

  • Community Member Profile Picture
    on at

    I think this approach is only possible if I have CRM Online, we have On premise CRM.

    Please confirm if it is still applicable.

  • RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi Aditya,

    after fetching the records from crm are you storing it somewhere locally or directly fetching from crm and displaying it in your app?

    Could you share some more info about?

  • unizap Profile Picture
    on at

    Hi,

    You are right. This is only possible for Online version right now. You may follow the below thread for more information on connectivity with on-premise CRM:

    powerusers.microsoft.com/.../18733

  • Community Member Profile Picture
    on at

    Hi Ravi,

    I am fetching entity type list and then I am f filtering and storing custom entities into string collection.

    I can fetch records of any entity by using fetch XML, no problem in getting any entity records.

    For that I need to ask every time to CRM to give me data...this is problem..

    Ideally, I wanted my application to immediately know that some record of particular entity is created into CRM. Or any record of particular entity is modified.

    I thought there must be some c# event delegate exposed on entity level or attribute level.. still in search of c# solution..

  • Community Member Profile Picture
    on at

    Thanks for the direction!

    With this approach,

    I have created one free dynamics 365 instance.

    I configured its connection MS flow.and created a simple rule.This went well

    But now I wanted to access this ms flow event in one of my desktop application.

    Is there any way to access microsoft flow into desktop app? I guess I need some office 365 APIs. Please guide.

  • Suggested answer
    unizap Profile Picture
    on at

    You can send a message to Azure Service Bus. There is an action available for this in MS Flow. (See screenshot)

    asb.jpg

    Next, you could use could use Azure Service Bus's OnMessage API. See here -> https://weblogs.asp.net/sfeldman/azure-service-bus-onmessage-api 

    This is just one approach of listening to CRM events. There could be many more direct/indirect ways to do this.

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