# From a custom field - call requestJira?

**URL:** <https://community.developer.atlassian.com/t/from-a-custom-field-call-requestjira/46775>\
**Category:** Forge Modules and Product Triggers\
**Created:** [April 3, 2021, 11:30am UTC](https://community.developer.atlassian.com/t/from-a-custom-field-call-requestjira/46775 "2021-04-03T11:30:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielwester](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/danielwester/32/36730_2.png) [@danielwester](https://community.developer.atlassian.com/u/danielwester)\
**Post date:** [April 3, 2021, 11:30am UTC](https://community.developer.atlassian.com/t/from-a-custom-field-call-requestjira/46775/1 "2021-04-03T11:30:39Z")

</div>

I’ve got a CustomField going but would like to restrict the access to the content depending on who the user is. Whenever I look at requestJira from the custom field - things go wrong.

Simply executing

```auto
await(await api.asApp().requestJira('/rest/api/3/user?expand=groups&accountId='+productContext.accountId) ).json();

```

causes the CustomFieldEdit view to throw an error of:

```auto
Unexpected child type: object. Valid children are @forge/ui components, function components, and strings.

```

My challenge is I don’t know what the object is - I’m not returning anything at that point… ☹

Any pointers? (Or any hidden api’s of where I can go and fetch a user’s groups…)

Help?

---

<div class="post-metadata">

**Author:** ![kkercz](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/kkercz/32/37626_2.png) [@kkercz](https://community.developer.atlassian.com/u/kkercz)\
**Post date:** [April 7, 2021, 6:34am UTC](https://community.developer.atlassian.com/t/from-a-custom-field-call-requestjira/46775/2 "2021-04-07T06:34:02Z")

</div>

Could you show your custom field rendering function? From one line alone it’s hard to say what’s going on exactly. I can only assume it’s the only line you have? In that case the error is expected: your function is supposed to return a UI Kit component, not returning anything will be an error.

For how to execute REST APIs in the rendering function, see here: [Access the whole entity property object from a Forge Jira custom field rendering function - #3 by mskrzypkowski](https://community.developer.atlassian.com/t/access-the-whole-entity-property-object-from-a-forge-jira-custom-field-rendering-function/44478/3).
