cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Chris_Craft
Frequent Visitor

Assigning a Case to a Queue with Flow

Hello all

Below is the end part of a flow that was proposed by a fellow community member (abm). The purpose of the flow is to assign a new Case to a Queue, upon creation of the Case. Part of this is to create and populate the Queue Item. The flow works well until it gets to the Create New Record (the Queue Item) section. It is seeking an Object for the Queue Item (I think!). There is nothing showing in the List Records section of the Dynamic Content. What is the Object it requires and where can it be found?

 

Assign Case to Queue and Create Queue Item.PNG

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
arjunmusuvathy
Helper III
Helper III

@Chris_Craft 

Hi Chris,

You will need an additional "Get a row" action after your trigger, then you can retrieve the lookup record's text value.

For your example, I have added the below steps to get the case owner:

1. Add a "Get a row" action where you get the created case (trigger)

 

lookupname5.PNG

 

2. Then do a compose to check your case owner using the below expression

outputs('Get_a_row_by_ID_(Get_the_created_Case)')?['body/_ownerid_value@OData.Community.Display.V1.FormattedValue']

 

lookupname4.PNG

 

lookupname1.PNG

 

Below is the raw output of "Get a row" action and this is where I got the code/expression from:

 

lookupname2.PNG

 

Similarly you can do for your "Customer" field in Cases: (using the expression below)

 

lookupname3.PNG

 

outputs('Get_a_row_by_ID_(Get_the_created_Case)')?['body/_customerid_value@OData.Community.Display.V1.FormattedValue']

 

Let me know how it goes.

 

You can also refer to Linn's blog below:
https://community.dynamics.com/365/b/linn-s-power-platform-notebook/posts/get-the-lookup-display-nam...

 

Thanks
Arjun
If this post helps, give a thumbs up and please consider marking it as a Solution to help other members.

 

View solution in original post

arjunmusuvathy
Helper III
Helper III

@Chris_Craft  Glad to know it helped you for the lookups.

 

For choices (optionset) you can do like below:

 

In my example, I am showing the expression that should be used for Case's origin field (OOB).

 

caseorigincode@OData.Community.Display.V1.FormattedValue

 

caseorigincode.png

 

Similarly you can find your choices field in a flow run and get the expression from there.

 

 

Thanks
Arjun
If this reply helps, give a thumbs up to help other members.

View solution in original post

6 REPLIES 6
Chris_Craft
Frequent Visitor

Further to the issue below, I have sorted this. The Object it required was the Case (Incident) not the Queue Item. I should have spotted this from the Object Type field below it.

The flow is now updating the Queue Item in the relevant Case. However, it is mapping the guid id's to the Queue Item, not the textual values.

I have created 4 new fields in the Queue Item to map these values to from the Case but these fields do not appear in the available Dynamic Content. Any ideas?

 

New Queue Item.PNG

arjunmusuvathy
Helper III
Helper III

@Chris_Craft 

Hi Chris,

You will need an additional "Get a row" action after your trigger, then you can retrieve the lookup record's text value.

For your example, I have added the below steps to get the case owner:

1. Add a "Get a row" action where you get the created case (trigger)

 

lookupname5.PNG

 

2. Then do a compose to check your case owner using the below expression

outputs('Get_a_row_by_ID_(Get_the_created_Case)')?['body/_ownerid_value@OData.Community.Display.V1.FormattedValue']

 

lookupname4.PNG

 

lookupname1.PNG

 

Below is the raw output of "Get a row" action and this is where I got the code/expression from:

 

lookupname2.PNG

 

Similarly you can do for your "Customer" field in Cases: (using the expression below)

 

lookupname3.PNG

 

outputs('Get_a_row_by_ID_(Get_the_created_Case)')?['body/_customerid_value@OData.Community.Display.V1.FormattedValue']

 

Let me know how it goes.

 

You can also refer to Linn's blog below:
https://community.dynamics.com/365/b/linn-s-power-platform-notebook/posts/get-the-lookup-display-nam...

 

Thanks
Arjun
If this post helps, give a thumbs up and please consider marking it as a Solution to help other members.

 

View solution in original post

Hello Arjun

Many thanks for your response.

I have updated the flow as you suggested:

 

Flow Update.PNG

 

Once I save the flow, I get the following message:

 

Flow Error Message.PNG

 

Best regards

 

Chris

Hello Arjun

I have found the error. I pasted the link you supplied verbatim, I needed to modify that to map to my flow elements. I needed to remove the part "Get_the_created_Case)":

outputs('Get_a_row_by_ID_(Get_the_created_Case)')?['body/_customerid_value@OData.Community.Display.V1.FormattedValue']

outputs('Get_a_row_by_ID')?['body/_customerid_value@OData.Community.Display.V1.FormattedValue']

 

So having done that, and after finding a few other funnies such inadequate field lengths, I managed to get the Compose values to map to the new Queue Item record created by the flow.

Test Flow.PNG

 

In order to get the Compose outputs to map to the Queue Item, I needed to create separate Compose steps for each Queue Item field to be mapped (this is where the field length error started).

Test Flow with Compose.PNG

 

This now working fine with one exception, I cannot use the Compose step for non-lookup type fields. I have one other field which is a Choices type field (the old Options List). Whichever way I try to map that, it always displays the guid reference value and not the option selected from the list.

 

If you have any ideas on that one, they would be appreciated.

 

Chris

arjunmusuvathy
Helper III
Helper III

@Chris_Craft  Glad to know it helped you for the lookups.

 

For choices (optionset) you can do like below:

 

In my example, I am showing the expression that should be used for Case's origin field (OOB).

 

caseorigincode@OData.Community.Display.V1.FormattedValue

 

caseorigincode.png

 

Similarly you can find your choices field in a flow run and get the expression from there.

 

 

Thanks
Arjun
If this reply helps, give a thumbs up to help other members.

View solution in original post

Thanks Arjun, that has worked perfectly. Many thanks for your help on this.

 

take care

 

Chris

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (107,548)