Solved

Custom Page Error - NAMESPACE_NOT_ALLOWED_AT_FIRST_ELEMENT


Userlevel 6
Badge +19

Hello all,

 

I am facing an error when saving a custom page.

Projection name is HfmReporting

Entity name is HfmAttributes

{"error":{"code":"ODATA_PROVIDER_ERROR","message":"An internal server error occurred. Contact administrator.","details":[{"code":"NAMESPACE_NOT_ALLOWED_AT_FIRST_ELEMENT","message":"Namespace is not allowed for Entity Sets, Singletons, Action Imports and Function Imports; found 'IfsApp.HfmReporting'."}]}}

What could be the error

 

 

Thanks

icon

Best answer by Rifki Razick 29 May 2023, 10:23

View original

8 replies

Userlevel 4
Badge +9

Hi @gumabs 

Looking at your screenshot it seems like you have missed setting an entity set for the page. The “Datasource Entity Set” field is empty in your page designer setting above.

When this is done the URL for the default call when clicking New should look something like …/HfmReport.svc/<EntitysetName>/IfsApp.HfmReporting….

 

Hope this helps.

Userlevel 6
Badge +19

Hi @Rifki Razick 

Thanks for reply. Obviously I missed that one. Thanks for help

Cheers

Furkan

Userlevel 6
Badge +19

@Rifki Razick 

Is there a way to set KEY this field on the entity?  

Thanks for reply

 

 

Userlevel 4
Badge +9

@Navinth Bakmeedeniya can you help with the question above which I think is about key attributes for custom entities?

Userlevel 6
Badge +12

@gumabs What do you really mean by the key here?

If it is the primary key, for Custom Entities, it is always ROWKEY which is system generated.

If it is alternative keys, then you can set alternative key if you want to enforce unique constraint on selected column(s).

Userlevel 6
Badge +19

Hi @Navinth Bakmeedeniya 

It is alternative key in this case. How can I enforce? Is it setup on entity configuration or on page designer?

Thanks for support

Userlevel 6
Badge +12

@gumabs
Even though there is business logic to support alternative key functionality, still there is no client-side support already available in entity configurations in core application (which is planned to deliver in 23R2 release as of now).

However, in existing IFS Cloud support tracks, as a workaround, you can add alternative key field from page designer into list in Custom Attributes page, set the alternative key for the relevant custom attributes & then you can sync the custom entities to have alternative keys defined.

Userlevel 6
Badge +19

Hi @Navinth Bakmeedeniya 

Thank you very much for explanation.

Reply