Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 601011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:40:07+00:00 2026-05-13T16:40:07+00:00

I’m creating a Dynamics CRM workflow assembly to be executed when a new Note

  • 0

I’m creating a Dynamics CRM workflow assembly to be executed when a new Note is created on another record of any type. I need to be able to access a property Prop1 on that newly created Note entity to accomplish other tasks.

Previously I’ve only accessed values that were input from a field or from the user, but never on a property of a newly created entity. Any guidance would be appreciated.

UPDATE:
This is regarding CRM 4.0.

More information while I wait:
Ultimately, this workflow assembly will create an email that contains a link to the parent entity of the newly created Note record. The property I need to get is the AnnotationId. Once the Note record is created, I will be retrieving the ObjectId and ObjectTypeCode based on the AnnotationId of the newly created Note.
(In case you were curious)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T16:40:07+00:00Added an answer on May 13, 2026 at 4:40 pm

    Ok so if your using 4.0 custom workflows and not 3.0 callouts, you should add a workflow assembly, and use the Context service and executing context of your workflow to pull the values from the new note.

    See the example below on how to access a record using the context service and the ID of your current context of execution (that should be your note)

        /// <summary>
        /// The Execute method is called by the workflow runtime to execute an activity.
        /// </summary>
        /// <param name="executionContext"> The context for the activity</param>
        /// <returns></returns>
        protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext)
        {
    
            // Get the context service.
            IContextService contextService = (IContextService)executionContext.GetService(typeof(IContextService));
            IWorkflowContext context = contextService.Context;
    
            // Use the context service to create an instance of CrmService.
            ICrmService crmService = context.CreateCrmService(true);
            BusinessEntity newNote = GetNote(crmService, context.PrimaryEntityId);
    
            string noteAttrib;
    
             noteAttrib = newNote.Properties.Contains("AnnotationId") ? ((Lookup)newNote.Properties["annotationid"]).name.ToString() : null;
    
            return ActivityExecutionStatus.Closed;
        }
    

    GetNotes method would be a standard query for notes by Id through a CRM service call,
    here is an example slightly modified from MSDN to return a note:

    private BusinessEntity getNote(ICrmService service, guid noteid)
    {
      // Create the column set object that indicates the fields to be retrieved.
      ColumnSet cols = new ColumnSet();
    
      // Set the columns to retrieve, you can use allColumns but its good practice to specify:
      cols.Attributes = new string [] {"name"};
    
      // Create the target object for the request.
      TargetRetrieveAnnotation target = new TargetRetrieveAnnotation();
    
      // Set the properties of the target object.
      // EntityId is the GUID of the record being retrieved.
      target.EntityId = noteid;
    
      // Create the request object.
      RetrieveRequest retrieve = new RetrieveRequest();
    
      // Set the properties of the request object.
      retrieve.Target = target;
      retrieve.ColumnSet = cols;
    
      // Execute the request.
      RetrieveResponse retrieved = (RetrieveResponse)service.Execute(retrieve);
      return RetrieveResponse;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 357k
  • Answers 357k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The other answers are correct. Here is some code you… May 14, 2026 at 9:40 am
  • Editorial Team
    Editorial Team added an answer you ruin the noConflict concept by reassigning the jquery to… May 14, 2026 at 9:40 am
  • Editorial Team
    Editorial Team added an answer If you get that particular error, you don't actually have… May 14, 2026 at 9:40 am

Related Questions

No related questions found

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.