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)

web service call from workflow

(0) ShareShare
ReportReport
Posted on by 76

Hello.

Workflow configured to Start When="Record is created" and call assembly that call web service.
When I run it manually by "Run Workflow" it works, service is called.
But when record is created automatically in CRM, web service does not called.

What the difference ?

*This post is locked for comments

I have the same question (0)
  • H V Profile Picture
    351 on at

    Hi,

    When record is created automatically in CRM, Did you check that workflow is called?

  • Marina Karapetyan Profile Picture
    76 on at

    Yes I check in Background Processes, status reason of workflow = "Succeeded".

  • Kalpavruksh D365 CoE Profile Picture
    2,545 on at

    Hi,

    Does your workflow triggered by the create event?

    Kindly check the workflow logs. Do you encountered any error?

  • erhan.keskin Profile Picture
    2,253 on at

    Hi Marina,

    Please re-think of what you pass to the web service in the assembly, and figure when that data is being generated, consider all the plugins and workflows of the entity for the execution order.

    Thanks,

  • Marina Karapetyan Profile Picture
    76 on at

    context.InputParameters.Contains("EntityId")  thats the reason, the EntityId is null, Why ?

  • erhan.keskin Profile Picture
    2,253 on at

    I assume it is a Synchronous WF. Can you please use it as Asynchronous?

  • Marina Karapetyan Profile Picture
    76 on at

    Workflow is Asynchronous, what else ?

    Thanks.

  • Verified answer
    erhan.keskin Profile Picture
    2,253 on at

    I assume you use the primary entity. Can you retrieve the values like this?

    var entityId = context.PrimaryEntityId;

    var entityLogicalName = context.PrimaryEntityName;

    otherwise;

    IWorkflowContext context = executionContext.GetExtension<IWorkflowContext>();

    Entity entity = (Entity)context.InputParameters["Target"];

  • Marina Karapetyan Profile Picture
    76 on at

    Hi Erhan,

    this helps !!!

    var entityId = context.PrimaryEntityId;

    var entityLogicalName = context.PrimaryEntityName;

    Thank you very very much !!!

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