Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Custom Workflow

(0) ShareShare
ReportReport
Posted on by 1,703

I'm generating a custom workflow to generate and send out reports to clients. 

The calling entity (new_remittanceadvice has two GUIDs that I need to get in the workflow to pass through to the report.

One is easy as its the primaryEntityId , my problem is how to get the guid from new_suppierrefid

code so far ;

 Dim tracingService = executionContext.GetExtension(Of ITracingService)()
                Dim workflowContext = executionContext.GetExtension(Of IWorkflowContext)()
                Dim context As IWorkflowContext = executionContext.GetExtension(Of IWorkflowContext)()
                Dim serviceFactory As IOrganizationServiceFactory = executionContext.GetExtension(Of IOrganizationServiceFactory)()
                Dim service As IOrganizationService = serviceFactory.CreateOrganizationService(context.UserId)

 Dim targetEntityImage As Entity = DirectCast(workflowContext.InputParameters("Target"), Entity)

' Prepare report parameter.
                Dim parameters(1) As ReportServer.ParameterValue
                ' Set Report ID
                parameters(0) = New ReportServer.ParameterValue()
                parameters(0).Name = "remittanceadvicesid"
                parameters(0).Value = context.PrimaryEntityId.ToString


*This post is locked for comments

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 54

#3
dkrishna Profile Picture

dkrishna 6

Featured topics

Product updates

Dynamics 365 release plans