Answers.Body: <p>To answer your different questions:</p>
  
  <blockquote>
    <p>I don't see what I would type in to locate it any other way?</p>
  </blockquote>
  
  <p>You would locate it by typing in the activity subject. Admittedly, this isn't perfect because some activities might have no subject, and therefore can't be located via autocomplete.</p>
  
  <blockquote>
    <p>Is there a way to override those new GUI elements</p>
  </blockquote>
  
  <p>Update: now the answer is yes :)
  As of CiviCRM 4.6.9 an EntityRef in the Api Explorer will accept any integer.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-28T18:08:05.760Z
Answers.Text: Just assume that any numeric input *is* the thing that the helper is trying to help you find? Rare case that a contact or activity subject would be a simple integer...
Answers.UserDisplayName: artfulrobot
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-28T20:51:40.310Z
Answers.Text: Ok here's a stab at it: https://github.com/civicrm/civicrm-core/pull/6624
Answers.UserDisplayName: Coleman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-28T22:08:53.360Z
Answers.Text: Fantastic! But does your regex allow for IDs>99? Should it be `*` not `?`
Answers.UserDisplayName: artfulrobot
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-29T00:50:14.063Z
Answers.Text: Gooood point. PR updated.
Answers.UserDisplayName: Coleman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-28T16:30:53.630Z
Answers.LastActivityDate: 2015-08-29T01:43:47.487Z
Answers.LastEditDate: 2015-08-29T01:43:47.487Z
Answers.UserDisplayName: Coleman
Body: <p>I know the numeric IDs I want to query, but I can't enter them. e.g. on entity <code>ActivityContact</code>, I want to use the <code>Contact ID</code> params, and the <code>Activity Id</code>.</p>
  
  <p>(I'm wanting to issue this request, which will only give me back what I already know, as a way of validating that the record exists.)</p>
  
  <p>On the Contact ID I get a Contact search, but I can't figure out how to bypass this to enter the numeric ID. It's not such a problem because I can always go look up the contact's name and type that in and select it.</p>
  
  <p>But I'm flummoxed by the Activity Id selector. I know the Activity Id I want, but I can't type a number in (it says not found), but I don't see what I <em>would</em> type in to locate it any other way?</p>
  
  <p><a href="https://i.sstatic.net/T65b3.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/T65b3.png" alt="screenshot of api explorer"></a></p>
  
  <p>Is there a way to override those new GUI elements (old explorer provided a workaround)? I tried using 'other' parameter and entering <code>activity_id</code> manually but it's too clever and noticed this and presented the GUI again!</p>
  
  <p>(I can run this in code, but I'm trying to get in to the much promoted habit of using the explorer for answers first and wondered if I was missing something.)</p>
  
  <p>Thanks.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-08-28T16:31:58.677Z
Comments.Text: Now I have a question for you: what in your website's theme is causing the "Action" field to be crazily stretched and how can we fix it?
Comments.UserDisplayName: Coleman
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-08-28T18:04:02.663Z
Comments.Text: Yeah. I wondered about that too!
Comments.UserDisplayName: artfulrobot
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-09-04T10:48:00.723Z
Comments.Text: @Coleman Well I'm not sure how the width of that field is supposed to be set. It seems that it has an inline style attribute setting `width:226px;display:inline;` but width has no effect on inline elements, and as this element contains `display:block` elements (which default to 100% width), seems my browser's only implimenting standard behaviour? ... changing the inline style to `width:226px;display:inline-block;` fixes... (same look on demo page, so not my theme)
Comments.UserDisplayName: artfulrobot
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-09-04T15:42:50.723Z
Comments.Text: http://d46.demo.civicrm.org/civicrm/api does not have this problem, the widget is a reasonable size and doesn't have 'inline' as a style. I suspect your theme's css might be applying the 'inline' style to form elements and then select2 picks up on that and adds it to the style property when it generates the select2 from the existing element.
Comments.UserDisplayName: Coleman
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-09-04T17:14:02.603Z
Comments.Text: That's interesting. Using Firefox 40, the demo site you link to DOES exhibit this behaviour, and does have 'inline' (happy to send screenshot). Using Chromium, it does't and it does use 'inline-block'. Perhaps I have a weird plugin installed that does very random things to inline styles...?!
Comments.UserDisplayName: artfulrobot
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-09-04T19:59:39.030Z
Comments.Text: Weird. Just tested in FF 40 on Linux and it looked normal. Then switched to FF 40 on Mac and it was messed up exactly like your screenshot. Not sure what to make of it, might be a FF bug that they'll fix?
Comments.UserDisplayName: Coleman
Tags: <api><4.6>
Title: How to enter an activity ID in the API Explorer?
ThreadText: # How to enter an activity ID in the API Explorer?
  
  (Asked by: username_0 on 2015-08-28)
  
  I know the numeric IDs I want to query, but I can't enter them. e.g. on entity `ActivityContact`, I want to use the `Contact ID` params, and the `Activity Id`.
  
  (I'm wanting to issue this request, which will only give me back what I already know, as a way of validating that the record exists.)
  
  On the Contact ID I get a Contact search, but I can't figure out how to bypass this to enter the numeric ID. It's not such a problem because I can always go look up the contact's name and type that in and select it.
  
  But I'm flummoxed by the Activity Id selector. I know the Activity Id I want, but I can't type a number in (it says not found), but I don't see what I *would* type in to locate it any other way?
  
  [![screenshot of api explorer](https://i.sstatic.net/T65b3.png)](https://i.sstatic.net/T65b3.png)
  
  Is there a way to override those new GUI elements (old explorer provided a workaround)? I tried using 'other' parameter and entering `activity_id` manually but it's too clever and noticed this and presented the GUI again!
  
  (I can run this in code, but I'm trying to get in to the much promoted habit of using the explorer for answers first and wondered if I was missing something.)
  
  Thanks.
  
  **Tags:** api, 4.6
  
  > **Comments:**
  > **username_1**: Now I have a question for you: what in your website's theme is causing the "Action" field to be crazily stretched and how can we fix it?  
  > **username_0**: Yeah. I wondered about that too!  
  > **username_0**: @username_1 Well I'm not sure how the width of that field is supposed to be set. It seems that it has an inline style attribute setting `width:226px;display:inline;` but width has no effect on inline elements, and as this element contains `display:block` elements (which default to 100% width), seems my browser's only implimenting standard behaviour? ... changing the inline style to `width:226px;display:inline-block;` fixes... (same look on demo page, so not my theme)  
  > **username_1**: http://d46.demo.civicrm.org/civicrm/api does not have this problem, the widget is a reasonable size and doesn't have 'inline' as a style. I suspect your theme's css might be applying the 'inline' style to form elements and then select2 picks up on that and adds it to the style property when it generates the select2 from the existing element.  
  > **username_0**: That's interesting. Using Firefox 40, the demo site you link to DOES exhibit this behaviour, and does have 'inline' (happy to send screenshot). Using Chromium, it does't and it does use 'inline-block'. Perhaps I have a weird plugin installed that does very random things to inline styles...?!  
  > **username_1**: Weird. Just tested in FF 40 on Linux and it looked normal. Then switched to FF 40 on Mac and it was messed up exactly like your screenshot. Not sure what to make of it, might be a FF bug that they'll fix?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-08-28. Score: 3 | Accepted answer
  
  To answer your different questions:
  
  > I don't see what I would type in to locate it any other way?
  
  You would locate it by typing in the activity subject. Admittedly, this isn't perfect because some activities might have no subject, and therefore can't be located via autocomplete.
  
  > Is there a way to override those new GUI elements
  
  Update: now the answer is yes :)
  As of CiviCRM 4.6.9 an EntityRef in the Api Explorer will accept any integer.
  
  > **Comments:**
  > **username_0**: Just assume that any numeric input *is* the thing that the helper is trying to help you find? Rare case that a contact or activity subject would be a simple integer...  
  > **username_1**: Ok here's a stab at it: https://github.com/civicrm/civicrm-core/pull/6624  
  > **username_0**: Fantastic! But does your regex allow for IDs>99? Should it be `*` not `?`  
  > **username_1**: Gooood point. PR updated.  
  
  ---
  
  