Update record in external database

Update record in external database

  

Hi, I have a SQL database hosted on Azure. I created an extension for this database and published it to Outsystems. I can read and create records in the database from the outsystems environment. However, the actions to update, get, and delete a record on the entity is missing ;-(  I only have the create action.

How do I get/create the update, get and delete actions?


I am using 10.0.704 using an in-cloud environment.


Thanks


Vonnelize

Hi,

From the top of my head, IIRC, you probably set the entities as read only in the extension, no? Just set read only to false

Cheers,

Eduardo Jauch

Hi Vonnelize,

Hope everything is ok with you. :)

Do those Entities have a primary key? Because the Entity Actions that you mentioned are the ones that need a primary key as input parameter.

Cheers,

José

I never remember of the primary key thing (never create tables without one, also). xD

And having the create, but not the get, the absence of the primary key is the most probable cause. 

Solution

José Costa wrote:

Hi Vonnelize,

Hope everything is ok with you. :)

Do those Entities have a primary key? Because the Entity Actions that you mentioned are the ones that need a primary key as input parameter.

Cheers,

José

Hi Josè, 

What a coincidence to have you answer my question. All good in South Africa - I am still busy on the same project than when we spoke last year. 


Thank you, your solution solved the problem. The table did not have a primary key. I did that in integration studio and the problem was solved. Thanks for helping!


I have another question but will post that in a new tread.


Vonnelize



Solution

Eduardo Jauch wrote:

Hi,

From the top of my head, IIRC, you probably set the entities as read only in the extension, no? Just set read only to false

Cheers,

Eduardo Jauch

Thank you for your suggestion. The primary key was the problem, but I did try to set the entity as read only as you suggested but I cannot find the setting in integration studio. Could you maybe indicate where this is done? Thanks, Vonnelize


I believe the suggestion was setting the entity as NOT read only. However, this setting doesn't exist for extensions - it's only available for eSpaces.

Yes, Paulo. This was the suggestion. I realize the error only after Jose"s answer, that was correct as the read only, if it was the case, wouldn't have allowed the creation of records but the get would be there, which was not the case for both.

But I got curious. It was one of those things that we assume the platform have and only notice it hasn't when we need it. 

Why is not possible to set an external entity to be read only through extension? What's the rationale behind this decision?

Cheers

Eduardo Jauch

This is why I love being part of the Outsystems community! There are always people willing to assist and get the discussions and questions going. Thanks guys!

If I remember correctly, the (SS) Read Only property was introduced well after Integration Studio was made available, and it's a bit more useful than it would in IS (enforcing developers to use a consistent strategy for modifying data).

Having this property in IS could be somewhat useful in very specific scenarios... but there is a workaround anyway if you want to restrict data changes - enforcing the right permissions at the database level, for the appropriate SQL user.

I can't speak for the Engineering team, but I think it's just a case of limited benefit + workaround exists = low prio. Anyway, submit it on the Ideas tab if you think it would be useful.