Can't send a entity with foreign Keys to another module and the UserId is appearing 0

Hi everyone,

I have a problem in outsystems that i can't solve, i tried search the problem and tutorials but nothing. My problem is that I can´'t send an entity with foreing keys to another module and when i try to create a athlete(in my case) i can't associate my user table to the athlete table, just appear 0's. Someone has the same problem? Someone knows how to solve it?

Solution

Hi Simão,

you're not passing the User Id.

Use GetUserId() for UserId attribute on CreateAtleta.

Regards

Hi Simao,

If you want to enter the current logged in user than use GetUserId() as mentioned by Jose and if you are creating a new user while creating a athlete than first create the user and than athlete and assign the output ID from CreateUser to UserID attribute of athlete.


mvp_badge
MVP

Hello Simão,

Hope you're doing well.

Can you please share more information about your issue? Some prints and extra information would be nice for us to understand what exactly is your issue and what you pretend to achieve :)


Kind regards,

Rui Barradas

Hello Rui, I already updated the problem hope you can solve it, thank you!

Solution

Hi Simão,

you're not passing the User Id.

Use GetUserId() for UserId attribute on CreateAtleta.

Regards

Hi Simao,

If you want to enter the current logged in user than use GetUserId() as mentioned by Jose and if you are creating a new user while creating a athlete than first create the user and than athlete and assign the output ID from CreateUser to UserID attribute of athlete.


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