Oracle Entity Actions

Oracle Entity Actions


after import an oracle entity with Integration Studio, the only action that is showed in Service Studio is Create action.
Can we have Update, Delete... actions?

Thank you

Ivan Soares
Hi Ivan,

Does your entity have a single primary key attribute?
I believe in OutSystems Service Studio you can only have update and delete actions in tables with primary keys.
Tiago Simões
I have the same problem: My Oracle tables do have a primary key, integration studio recongnizes it as an identifier, but the Service Studio does not recognize it as a primary key. It's also impossible to manage the entities in the Service Studio because they are foreign extensions...
What can I do Integration Studio to recognize my primary keys?
Hi Hans,

To specify your external ENTITY identifiers you must set the "Identifier" property of your external entity in Integration Studio (it is right below the physical table name property). In this property you can choose which is the field of your ENTITY that corresponds to its Primary Key (WARNING: only simple primary keys are supported).

If you do this, you can use entity actions in your consumming eSpace (in SS) and even specify foreign keys to your ENTITY in the extension itself (in IS) and in the consuming eSpace (in SS).

Hope it helps.

Best Regards,

Daniel Lourenço
Hi Daniel,

Thanks for your reply. I followed your advices and it works for 'read only' primary keys.
But I have this problem: In some cases my users have to enter the data of the primary key themselves. For instance: Special codes are entered by the user (and checked in Oracle by a check constraint) because they cannot be generated. But OutSystems doesn't let me enter data in the PK-field.

For instance: I have a very simple reference table (WISLMTEXP) with 2 fields: CODE and NAME. The field 'CODE' is my PK in the Oracle database and has data type VARCHAR2(4), so it is text.
When I use this in OutSystems, it recognizes the PK in Integration Studio and in Service Studio as well.
But when I create a screen with the 2 fields in it I receive constantly the error message:

Invalid Data Type 'Text PhoneNumber Integer Decimal Currency DateTime Date Time' data type required instead of 'WISLMTEXP identifier'.

I'm stuck at this moment and I am wondering if OutSystems has the possibility to use primary key fields as normal enterable fields. When not, we cannot use OutSystems. (We are busy with a pilot test to use OutSystems instead of Oracle Forms, but I'm afraid that the functionality of OutSystems is not enough then..).
I hope I'm wrong, because OutSystems is a very intuitive way of developing and I like it.

I hope you are able to help me with this problem. Thanks in advance!.

Kind regards,

Hans Quist
Provincie Zeeland, Middelburg, The Netherlands
Hi Hans,

In fact you cannot edit a variable of the type Entity Identifier on screen inputs. As such, the way to overcome this limitation, what you have to do is to store the Identifier of your record in a text variable (eg: TEXTINPUT_RecordId) that is bound to your screen INPUT FIELD. To create (or update) your record using entity actions, you simply have to set the identifier of the record itself to the value of the text variable before executing the Create, Delete, Update or CreateOrUpdate operation using the *TextToEntityRefText* built in function.

WARNING: The Update operation using the outsystems Entity actions uses the input record identifier to know which is the record to be affected. This means that it is not possible to execute an update to the id of a record with an outsystems entity action. See the example below.

Imagine the following:
- We have two records: Id=A and Id=b
- We get the Id=A from the database (with a get query) and change the record id to B with an assign
- We then execute the Update Entity action on the record
- The updated database record is the one with Id=B (the Id=A is never changed because
the Update Entity action uses the id to determine the updated record)

To execute an ID update on the database, you have to use an advanced query (
careful that this is an extremely dangerous operation, as it changes the primaty key value of the record, which is highly unadvisable, as it might break or mess up references to that record)

Attached are a test eSpace and extension ( that examplify this situation (*see the screen TestChangeTableNameSrc*). It executes all the operations I talked about in an entity named DANIEL_TEST)

Best Regards,

Daniel Lourenço