# Error when trying to select entity to create ticket

**URL:** <https://forum.sambapos.com/t/error-when-trying-to-select-entity-to-create-ticket/10433>\
**Category:** V5 Question\
**Created:** [April 20, 2016, 1:32pm UTC](https://forum.sambapos.com/t/error-when-trying-to-select-entity-to-create-ticket/10433 "2016-04-20T13:32:38Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [April 20, 2016, 7:20pm UTC](https://forum.sambapos.com/t/error-when-trying-to-select-entity-to-create-ticket/10433/21 "2016-04-20T19:20:58Z")

</div>

Your what type of order is this question, what rule event is that?  
The question suggests it would be ticket created but it asks on selecting the second entity (table) so cant be ticket created…  
My guess would be something in that automation is causing the error, something like entity selected rule which is trying to use customer entity in some way so when picking table only is causing some form of error being why if you select customer first is not crashing. Just a guess…

---

<div class="post-metadata">

**Author:** ![antasp3136](https://forum.sambapos.com/user_avatar/forum.sambapos.com/antasp3136/32/52734_2.png) [@antasp3136](https://forum.sambapos.com/u/antasp3136)\
**Post date:** [April 20, 2016, 7:27pm UTC](https://forum.sambapos.com/t/error-when-trying-to-select-entity-to-create-ticket/10433/22 "2016-04-20T19:27:17Z")

</div>

![](https://forum.sambapos.com/uploads/default/original/3X/9/2/92ffb534ae06a4e01ac9d467059d6f84e55e4009.png)

 ![](https://forum.sambapos.com/uploads/default/original/3X/d/4/d436038eea3209c7ef8a1b4038e04e3b2cb42cce.png)

 ![](https://forum.sambapos.com/uploads/default/original/3X/8/8/8879d5bfce4eeb7d30e3f89960a0ee26c0c646fa.png)

 ![](https://forum.sambapos.com/uploads/default/original/3X/0/8/089a55e668c483d4cd54604d8a2b6afd0b048e03.png)

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [April 20, 2016, 7:28pm UTC](https://forum.sambapos.com/t/error-when-trying-to-select-entity-to-create-ticket/10433/23 "2016-04-20T19:28:11Z")

</div>

Show screen shot of whatever rule is involved for that what type of order question…

---

<div class="post-metadata">

**Author:** ![antasp3136](https://forum.sambapos.com/user_avatar/forum.sambapos.com/antasp3136/32/52734_2.png) [@antasp3136](https://forum.sambapos.com/u/antasp3136)\
**Post date:** [April 20, 2016, 7:32pm UTC](https://forum.sambapos.com/t/error-when-trying-to-select-entity-to-create-ticket/10433/24 "2016-04-20T19:32:48Z")

</div>

exported the rules, actions, and automation commands that are configured in my setup.

[rulesactionscommands.zip](https://forum.sambapos.com/uploads/default/original/3X/4/c/4caceef1858601bd2be0fbb1b5f9ca229430bfdc.zip) (8.5 KB)

---

<div class="post-metadata">

**Author:** ![antasp3136](https://forum.sambapos.com/user_avatar/forum.sambapos.com/antasp3136/32/52734_2.png) [@antasp3136](https://forum.sambapos.com/u/antasp3136)\
**Post date:** [April 20, 2016, 7:37pm UTC](https://forum.sambapos.com/t/error-when-trying-to-select-entity-to-create-ticket/10433/25 "2016-04-20T19:37:28Z")

</div>

![](https://forum.sambapos.com/uploads/default/original/3X/7/2/728a84a06053b1c3417ce3f40896cb47dd88faea.png)

 ![](https://forum.sambapos.com/uploads/default/original/3X/7/d/7d5974183bf0c8bb9ef10de22a89957fdd678a94.png)

 ![](https://forum.sambapos.com/uploads/default/original/3X/0/a/0a86720c369f04a441731956c44da1673af7c2a8.png)

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [April 20, 2016, 7:38pm UTC](https://forum.sambapos.com/t/error-when-trying-to-select-entity-to-create-ticket/10433/26 "2016-04-20T19:38:27Z")

</div>

Where is command value coming from in ticket created rule?

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [April 20, 2016, 7:40pm UTC](https://forum.sambapos.com/t/error-when-trying-to-select-entity-to-create-ticket/10433/27 "2016-04-20T19:40:51Z")

</div>

Watch this, is a video im working on to explain automation and more specificly the ask question automation command flow;

  
Is lacking narration but should give you the idea…

Your update ticket status to new should already be in the default rule.  
Your ask question would be in the ticket created event rule and the actions using command value will be in the automation command executed rule triggered by the ask question…

---

<div class="post-metadata">

**Author:** ![antasp3136](https://forum.sambapos.com/user_avatar/forum.sambapos.com/antasp3136/32/52734_2.png) [@antasp3136](https://forum.sambapos.com/u/antasp3136)\
**Post date:** [April 20, 2016, 7:54pm UTC](https://forum.sambapos.com/t/error-when-trying-to-select-entity-to-create-ticket/10433/28 "2016-04-20T19:54:06Z")

</div>

the ordertype rule is asking the question and the command value is tagging the ticket from that is it not?

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [April 20, 2016, 7:58pm UTC](https://forum.sambapos.com/t/error-when-trying-to-select-entity-to-create-ticket/10433/29 "2016-04-20T19:58:42Z")

</div>

> [@antasp3136](#):
>
> the ordertype rule is asking the question and the command value is tagging the ticket from that is it not?

No, for one you have not shown an order type rule, only an ask question action called order type which looks like you have put [:CommandValue] in as a constraint. (Constraint is an expression as to if that action should be included in the nothing else and the automation command name in the ask question action does not refer to the field of another action)

This is most likely your issue…that that flow is completly messed up.  
You ask question would be in the ticket created rule, the tagging action and refresh should be in a seccond rule with an event of automation command executed and rule constraint of command name = the name set in the ask question so that the ask question triggers that rule and passes it the command value from the button pressed.

Watch that video - it might help you understand the flow you need.

Sugest you probably best to redo that part of your flow from scratch making sure you understand the ask question command flow.

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [April 20, 2016, 8:19pm UTC](https://forum.sambapos.com/t/error-when-trying-to-select-entity-to-create-ticket/10433/30 "2016-04-20T20:19:44Z")

</div>

Have changed to question for now as pretty sure this is what is causing your issue and is not a bug which is what ISSUE is for. If something comes to light suggesting a bug we can change back.

---

<div class="post-metadata">

**Author:** ![antasp3136](https://forum.sambapos.com/user_avatar/forum.sambapos.com/antasp3136/32/52734_2.png) [@antasp3136](https://forum.sambapos.com/u/antasp3136)\
**Post date:** [April 21, 2016, 12:24pm UTC](https://forum.sambapos.com/t/error-when-trying-to-select-entity-to-create-ticket/10433/31 "2016-04-21T12:24:17Z")

</div>

So getting back to this… im still not sure whats wrong here… because you said that i dont have the ask question rule in the setup but the order type action is the ask question action which is in this rule below…

 ![](https://forum.sambapos.com/uploads/default/original/3X/0/9/09974ad3d08c862cf4914fed122a98324e794617.png)

---

<div class="post-metadata">

**Author:** ![antasp3136](https://forum.sambapos.com/user_avatar/forum.sambapos.com/antasp3136/32/52734_2.png) [@antasp3136](https://forum.sambapos.com/u/antasp3136)\
**Post date:** [April 21, 2016, 12:36pm UTC](https://forum.sambapos.com/t/error-when-trying-to-select-entity-to-create-ticket/10433/32 "2016-04-21T12:36:57Z")

</div>

ok so i changed the setup so that the rules are the way i think that you are suggesting… but i still cannot open a ticket from choosing a table entity if i havent chooses a customer entity first… anyways below are the changes i made.

 ![](https://forum.sambapos.com/uploads/default/original/3X/9/b/9b2a7c8f8fb77ebf616c153dfa721d51ec1b08c0.png)

 ![](https://forum.sambapos.com/uploads/default/original/3X/8/c/8c85166d9779c3c2eefb6f0e6c629c0ce9c6cd58.png)

---

<div class="post-metadata">

**Author:** ![antasp3136](https://forum.sambapos.com/user_avatar/forum.sambapos.com/antasp3136/32/52734_2.png) [@antasp3136](https://forum.sambapos.com/u/antasp3136)\
**Post date:** [April 21, 2016, 12:50pm UTC](https://forum.sambapos.com/t/error-when-trying-to-select-entity-to-create-ticket/10433/33 "2016-04-21T12:50:11Z")

</div>

I also tried to delete the entity screen and recreate it. Still the same issue and error message.

---

<div class="post-metadata">

**Author:** ![antasp3136](https://forum.sambapos.com/user_avatar/forum.sambapos.com/antasp3136/32/52734_2.png) [@antasp3136](https://forum.sambapos.com/u/antasp3136)\
**Post date:** [April 21, 2016, 12:52pm UTC](https://forum.sambapos.com/t/error-when-trying-to-select-entity-to-create-ticket/10433/34 "2016-04-21T12:52:59Z")

</div>

So this is interesting… I changed the entity screen from automatic to layout and added the Entity Grid widget and it works fine like that… seems like there is a bug when choosing the automatic option for entity screen.

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [April 21, 2016, 4:05pm UTC](https://forum.sambapos.com/t/error-when-trying-to-select-entity-to-create-ticket/10433/35 "2016-04-21T16:05:34Z")

</div>

It wont be automatic entity screen, any bug there would have been found long time ago being such a major core feature.

This should have sorted that rule, you should not be getting a tag as expected.

As for the issue, lets continue looking in to that.  
Can you show a screen shot of your refresh ticket action firstly.  
Then can you confirm if you have any other non default rules or modified rule on any of these rule events;  
Ticket Created  
Entity Selected  
Entity Updated

---

<div class="post-metadata">

**Author:** ![antasp3136](https://forum.sambapos.com/user_avatar/forum.sambapos.com/antasp3136/32/52734_2.png) [@antasp3136](https://forum.sambapos.com/u/antasp3136)\
**Post date:** [April 21, 2016, 4:11pm UTC](https://forum.sambapos.com/t/error-when-trying-to-select-entity-to-create-ticket/10433/36 "2016-04-21T16:11:20Z")

</div>

Refresh Ticket Action:

 ![](https://forum.sambapos.com/uploads/default/original/3X/8/b/8be70e3789a4d4468b306513455a0c9ec0ecdc16.png)

Ticket created rule:

 ![](https://forum.sambapos.com/uploads/default/original/3X/0/5/056f4dd51c6b7cebd905e53001a367165f41aec3.png)

Entity Updated:

 ![](https://forum.sambapos.com/uploads/default/original/3X/d/b/db46d1fb56f35e75afac3b1dd722930188022b37.png)

And I have no Entity Selected Rule.

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [April 21, 2016, 4:21pm UTC](https://forum.sambapos.com/t/error-when-trying-to-select-entity-to-create-ticket/10433/37 "2016-04-21T16:21:43Z")

</div>

I get the feeling narrowing down whats causing it is going to take ages, do you want to PM me a backup?

---

<div class="post-metadata">

**Author:** ![antasp3136](https://forum.sambapos.com/user_avatar/forum.sambapos.com/antasp3136/32/52734_2.png) [@antasp3136](https://forum.sambapos.com/u/antasp3136)\
**Post date:** [April 21, 2016, 4:22pm UTC](https://forum.sambapos.com/t/error-when-trying-to-select-entity-to-create-ticket/10433/38 "2016-04-21T16:22:28Z")

</div>

Sure. What all do you need?

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [April 21, 2016, 4:24pm UTC](https://forum.sambapos.com/t/error-when-trying-to-select-entity-to-create-ticket/10433/39 "2016-04-21T16:24:17Z")

</div>

Yer, easiest way at this point I think, PM message a full backup from samba backup.

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [April 21, 2016, 5:04pm UTC](https://forum.sambapos.com/t/error-when-trying-to-select-entity-to-create-ticket/10433/40 "2016-04-21T17:04:15Z")

</div>

@antasp3136 I found your problem.  
You edited the default ‘Update Ticket Status’ action.  
By default it doesnt have current status field ([:Current Status]) carried into the rule action.  
If you do this and leave it blank it is looking to only update ticket status if ticket status is currently blank but on ticket created the ticket doesnt have any status yet alone blank so you cant specify one.  
Dont know if you added this to use in other rule somewhere but you need to ONLY set status without referencing current status.

 ![](https://forum.sambapos.com/uploads/default/original/3X/1/8/18513ee25f7e8e913d748ca4fe2d907536c51ca8.gif)

![](https://forum.sambapos.com/uploads/default/original/3X/2/0/204503136dbeb005e1d36ebb2475533227335313.png)

 ![](https://forum.sambapos.com/uploads/default/original/3X/1/9/19fd0db48ebcad37ad5636a6f508d85d98abda6d.png)

As I said though if you edited this to use in other rules it will obviously cause other issues.  
Might be best to recreate default rule with different name and only state to be set and using that.

[Previous page](https://forum.sambapos.com/t/error-when-trying-to-select-entity-to-create-ticket/10433.md?page=1)

[Next page](https://forum.sambapos.com/t/error-when-trying-to-select-entity-to-create-ticket/10433.md?page=3)
