Demo: How To Create and Use Actions (DATABASE ERROR)

Hello, everyone!

I'm having some difficulties to finish this lesson:

Demo: How To Create and Use Actions

I have followed the step-by-step guide twice, but the same error appears on the screen everytime I try to finish it. The only part I didn't follow the guide exaclty the same way was the login part - the video suggests me to use 'edward.taylor' as username, but I do not have its password. So I tried to login as my normal user account. The error is reproduced below:

 Can anyone help me out of this? I'll be really thankfull!

Solution

The 'CreatedBy' (in Order table) is 'Employee Identifier' data type. And in the 'OrderCreateOrUpdate' action you are setting it as user identifier (GetUserId()).

You must either set the current Employee Id in the assign of the action or change the type from 'CreatedBy' to User Identifier, if you want to register who created the record


Hi frederico,

The ID you are inserting in foreign key column it should be present in parent table.

for example:

if there r 2 entities order and employee .

 createby is the foreign key in order table of type employeeId .

now if you r inserting data in order table then the id you inserting in order tables createdby column should be present in employee table


regards,

Pramod.

As Pramod said, see what is the EmployeeId passed in the action and check if it exists in the parent table.


Can you post the title of the course you are working on? The video title doesn't help me find your guide.


Sure!

I'm working on a Guided Path and sending to you the printscreens.

The issue I'm facing some troubles is in this course specifically:

Okay, I'm looking at the project now. I'll let you know what I see.

Okay, I think I see the issue. Can you post your current OML for comparison?

Sure!

Here it goes.

Orders Management.oap

Solution

The 'CreatedBy' (in Order table) is 'Employee Identifier' data type. And in the 'OrderCreateOrUpdate' action you are setting it as user identifier (GetUserId()).

You must either set the current Employee Id in the assign of the action or change the type from 'CreatedBy' to User Identifier, if you want to register who created the record


Thank you so much, Anderson! Worked like a charm!

That was exactly the problem I had to solve, but I was struggling to find where and how lol

Best regards!

You welcome! I hope you can enjoy the benefits of working with this platform. Anything just ask! Have a great journey!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.