Skip to main content

uniface 10: delete an entity using code

  • June 6, 2023
  • 2 replies
  • 2 views

OsmanShariff
Forum|alt.badge.img+3

What is the best practice way to delete a uniface entity using a uniface component.

There is UCGROUP and UCGROUP_ONE(subtype) both related to UCRELSH

To do it correctly, in one remocc,  I see the need to create a subtype UCRELSH_ONE in DICT.

The alternative is to do 2 remocc's... UCGROUP and UCGROUP_ONE

or, is there some other way?



------------------------------
Osman Shariff
------------------------------

2 replies

Knut Dybendahl
Forum|alt.badge.img
  • Participating Frequently
  • June 9, 2023

What is the best practice way to delete a uniface entity using a uniface component.

There is UCGROUP and UCGROUP_ONE(subtype) both related to UCRELSH

To do it correctly, in one remocc,  I see the need to create a subtype UCRELSH_ONE in DICT.

The alternative is to do 2 remocc's... UCGROUP and UCGROUP_ONE

or, is there some other way?



------------------------------
Osman Shariff
------------------------------

Hi Osman,

I guess it also depends on the RI setup in DICT?
Standard would be RES - you cannot delete parent record before child record is deleted.
Or - you could change the RI setup to be CAS - remove all child records when the parent
record is deleted...
And of course add some code to the delete triggers as they would probably be empty...

Regards,

Knut



------------------------------
Knut Dybendahl
------------------------------

OsmanShariff
Forum|alt.badge.img+3
  • Author
  • Participating Frequently
  • June 12, 2023

Hi Osman,

I guess it also depends on the RI setup in DICT?
Standard would be RES - you cannot delete parent record before child record is deleted.
Or - you could change the RI setup to be CAS - remove all child records when the parent
record is deleted...
And of course add some code to the delete triggers as they would probably be empty...

Regards,

Knut



------------------------------
Knut Dybendahl
------------------------------

Hello Knut

Actually, the standard setup is CAS... and v10 functionality allows for an easy way to add the many entities in a service.  So, everything works fine.

The slight issue is that there are 2 relationships  ucgroup-> ucrelsh.  It just means there is a need to change the DICT model.



------------------------------
Osman Shariff
------------------------------