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)

Access Portal Comment activity from custom workflow

(0) ShareShare
ReportReport
Posted on by

Hi,

I have a portal comment activity. I want to call Custom workflow on this portal comment activity. I am able to call custom workflow but I want to access fields from this Portal comment activity. Fields like a subject of portal comment, description, To etc. etc.

I want to compose an Email and in that email, I want to use these values. What are the ways other than parameter passing?

*This post is locked for comments

I have the same question (0)
  • Ashutosh9 Profile Picture
    on at

    Also I tried to pass argument to my custom workflow.

    [Input("Input Contact")]

           [ReferenceTarget("contact")]

           public InArgument<EntityReference> ToInputContact { get; set; }

    but the "ToInputContact" parameter is from contact or from systemuser entity. Here the referencetarget is contact only.

  • Suggested answer
    Arpit Shrivastava Profile Picture
    7,518 User Group Leader on at

    Hi Ashutosh,

    Is there specific requirement/need to use Custom Workflow?

    If you simply want to send the email notification as soon as any new comment is being added from Portal, you can easily achieve it through System Workflow instead of Custom Workflow unless any specific requirement/logic needs to be build.

    Here is the sample configuration:

    828667236.Capture.PNG

    828667236.Capture.PNG

    If my answer helped to resolve your issue, kindly verify it by clicking 'Yes'. It would be helpful to the other community members seeking to resolve a similar issue.


    Cheers
    Arpit
    https://arpitmscrmhunt.blogspot.in

     

  • Ashutosh9 Profile Picture
    on at

    Portal comment is at backend.

    We have business requirement, tha't why we are writing custom workflow.

    I want to access "To" field of Portal Comment activity and then want to send email to the To and CC fields.

  • Suggested answer
    Arpit Shrivastava Profile Picture
    7,518 User Group Leader on at

    That too, you can achieve it through System Workflow. Map your Portal Comment TO field to the Email TO and CC field.

    3264.Capture.PNG

    Anyways, If you still want to go with Custom one, Take a look below article, shows input parameters for different data types:

    http://anythingcrm.blogspot.in/2013/07/crm-2011-workflow-activity-parameter.html

    If my answer helped to resolve your issue, kindly verify it by clicking 'Yes'. It would be helpful to the other community members seeking to resolve a similar issue.


    Cheers
    Arpit
    https://arpitmscrmhunt.blogspot.in

     

  • Ashutosh9 Profile Picture
    on at

    This is correct. But my portal comment To is the party list. It has both contact and systemuser. So, I am not able to give reference target and default value to the To field. Is there any other way I can pass To field as a parameter.

    I am trying below code to access it with activity

    Guid emailId = new Guid(activity);

    Entity email = service.Retrieve("email", emailId, new ColumnSet("to"));

    EntityCollection to = email.GetAttributeValue<EntityCollection>("to");

    But here in "activity" i am getting a value of "subject" field of activity portal.(don't know why happens it)

  • Community Member Profile Picture
    on at

    I am trying to do something similar. I would like to send an email to the customer when a comment is added, and I would also like to have it send a link back to the portal where the comment is.

    Something like:

    Dear Customer,

    There is a new comment on Case (Case ID *If possible*).

    Please go to http://portalurl  to view the comment.

    Would something like this be possible?

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