[OUTSYSTEMS].DBO.[OSUSR_XXXX] with key 0 was not updated

Hi All,

whenever i am trying to update any field in a certain form i am facing the following error and this is not happening for all the employees it just happens for 1 or 2, could you tell me what could be the issue.

[OUTSYSTEMS].DBO.[OSUSR_XXXX] with key 0 was not updated

Thanks,

Mamini

Hi Mamini,

That error means that you try to save an Entity record with a NullIdentifier() as key. Just debug your app to see where the problem lies.

Hi Kilian,

I am getting error NATURE with key 0 was not found I have Application type combo box widget on click it is running a server action which will enable or disable the nature widget for a particular value selected for the application Type combo box but I m getting this error . I have taken a local variable Nture_Enable and assigned it  with value GetNature(Form.Record.NatureId).Nature.Is_Active = True and for disable it is False and in enabled option of nature widget I have given this variable Nature_Enable. do you have a solution ? i know this error I might get due to passing null identifier but I don't know how to fix it.

Hi Nikita, 

The error seems to be be because your form doesn't have any nature record loaded (e.g. a new record)

May i suggest you do a check whether your form.record.natureid is nullidentifier() first before doing the getnature. 

something like 

if(form.Record.NatureId = nullidentifier(), <true or false>, getnature(form.record.natureid).nature.is_active)

Caulibeam wrote:

Hi Nikita, 

The error seems to be be because your form doesn't have any nature record loaded (e.g. a new record)

May i suggest you do a check whether your form.record.natureid is nullidentifier() first before doing the getnature. 

something like 

if(form.Record.NatureId = nullidentifier(), <true or false>, getnature(form.record.natureid).nature.is_active)

Hi Caulibeam, 

Thanks for the reply I found the solution it was happening bcoz there was not a single record submitted in the form once I submitted the form with values it continued to work properly anyway thank you.