User A starts a stepper for authoring a car and changes color from red to black. However, the user does not finish the edit. Instead it is saved until later.
Meanwhile User B opens the same record in the same stepper and changes the color from red to grey and saves the data (completes the stepper)
When User A returns, he/she can happily complete the stepper. The GD value is changed to black without any error, notice or warning that someone else has updated the information in between.
Of course we could setup some kind of workaround that copies e.g. the load id from the originating golden record and then we create a validator for this, but we would of course want to avoid adding a custom solution like this for every workflow and stepper.
(these are all basic entities)
Best Answer
S
Subham Dixit
said
about 1 year ago
There is an existing enhancement request 'Display concurrent change indicator in browsing' in which you can mention the customer that is asking for this.
The workaround you mention is a good one.
Another way to do this is to add an indicator to show that the record is currently being edited.
It will call a custom procedure like this:
/* Return a comma separated list of users that are currently editing this record */
/* PostgreSQL */
create or replace function usr_get_change_indicator(p_id numeric)
RETURNS text
LANGUAGE plpgsql
AS $function$
declare
ret text;
begin
select string_agg( b.b_loadcreator || ' (' || b.b_loadid || ')', ', ' order by b.b_loadid ) into ret
from
sa_my_entity me
inner join dl_batch b on b.b_loadid = me.b_loadid
where me.id = p_id
and b.b_status = 'RUNNING';
return ret;
end
$function$
;
/* Oracle equivalent */
select LISTAGG(D.B_LOADCREATOR || ' (' || D.B_LOADID || ')' , ', ') within group (order by D.B_LOADID)
from
SA_PRODUCT P
inner join DL_BATCH D on P.B_LOADID = D.B_LOADID
where P.ID = &p_id
and D.B_STATUS = 'RUNNING';
It displays in a collection column where the id of the record being changed is passed to the procedure, so the indicator can warn that the record is being edited by another user.
Note: displaying this in the collection is sufficient for many use cases. But you can got a step further and add a Condition on the Edit Action Configuration using a call to the same function to really prevent a second user from editing the record.
1 Comment
S
Subham Dixit
said
about 1 year ago
Answer
There is an existing enhancement request 'Display concurrent change indicator in browsing' in which you can mention the customer that is asking for this.
The workaround you mention is a good one.
Another way to do this is to add an indicator to show that the record is currently being edited.
It will call a custom procedure like this:
/* Return a comma separated list of users that are currently editing this record */
/* PostgreSQL */
create or replace function usr_get_change_indicator(p_id numeric)
RETURNS text
LANGUAGE plpgsql
AS $function$
declare
ret text;
begin
select string_agg( b.b_loadcreator || ' (' || b.b_loadid || ')', ', ' order by b.b_loadid ) into ret
from
sa_my_entity me
inner join dl_batch b on b.b_loadid = me.b_loadid
where me.id = p_id
and b.b_status = 'RUNNING';
return ret;
end
$function$
;
/* Oracle equivalent */
select LISTAGG(D.B_LOADCREATOR || ' (' || D.B_LOADID || ')' , ', ') within group (order by D.B_LOADID)
from
SA_PRODUCT P
inner join DL_BATCH D on P.B_LOADID = D.B_LOADID
where P.ID = &p_id
and D.B_STATUS = 'RUNNING';
It displays in a collection column where the id of the record being changed is passed to the procedure, so the indicator can warn that the record is being edited by another user.
Note: displaying this in the collection is sufficient for many use cases. But you can got a step further and add a Condition on the Edit Action Configuration using a call to the same function to really prevent a second user from editing the record.
Subham Dixit
Consider the follow scenario:
User A starts a stepper for authoring a car and changes color from red to black. However, the user does not finish the edit. Instead it is saved until later.
Meanwhile User B opens the same record in the same stepper and changes the color from red to grey and saves the data (completes the stepper)
When User A returns, he/she can happily complete the stepper. The GD value is changed to black without any error, notice or warning that someone else has updated the information in between.
Of course we could setup some kind of workaround that copies e.g. the load id from the originating golden record and then we create a validator for this, but we would of course want to avoid adding a custom solution like this for every workflow and stepper.
(these are all basic entities)
There is an existing enhancement request 'Display concurrent change indicator in browsing' in which you can mention the customer that is asking for this.
The workaround you mention is a good one.
Another way to do this is to add an indicator to show that the record is currently being edited.
It will call a custom procedure like this:
It displays in a collection column where the id of the record being changed is passed to the procedure, so the indicator can warn that the record is being edited by another user.
Note: displaying this in the collection is sufficient for many use cases. But you can got a step further and add a
Condition
on theEdit Action Configuration
using a call to the same function to really prevent a second user from editing the record.Subham Dixit
There is an existing enhancement request 'Display concurrent change indicator in browsing' in which you can mention the customer that is asking for this.
The workaround you mention is a good one.
Another way to do this is to add an indicator to show that the record is currently being edited.
It will call a custom procedure like this:
It displays in a collection column where the id of the record being changed is passed to the procedure, so the indicator can warn that the record is being edited by another user.
Note: displaying this in the collection is sufficient for many use cases. But you can got a step further and add a
Condition
on theEdit Action Configuration
using a call to the same function to really prevent a second user from editing the record.-
Extend a model with new entities or attributes
-
Data types in xDM
-
Effective date on entities
-
Search using wild cards
-
Export a model from production and import on a development environment
-
"Allow Delete" vs "Allow Removal" privileges
-
LOV label in Named Query
-
Select location on a map and save coordinates
-
Is there a way to set up a master-detail relationship on browse mode?
-
Choose Either a Stepper or A Workflow Based on The User Privileges
See all 178 topics