Row has been modified by anoth er user and couldn’t be updated

Thanks for your reply Jose and sorry for my delay.

There are no errors, I checked the log file too. It's just the, Job Entry>Job Details>Materials>Detail screen still needs to be refreshed.

From you're comment though I assume that I have done the right thing which is always nice to know.

I’ll start at the beginning, it’s been fairly common for us to use method directives, and generally they work just fine.


However on occasion we have hit a problem were they don’t quite work. What happens in use is the method directives run but don't actually update the screens which means the users have to hit the refresh button to see the true picture, not the best thing but manageable.


However, I recently thought surely you must be able to get around this problem using a customisation and indeed you can, with one problem When saving their work the users get the mesage.


Row has been modified by another user and couldn’t be updated.


I’ve tried to get around this without any success.


Has anybody got any
pointers, documentation, in fact anything that might help me solve
this problem?


You need to refresh the dataset before it gets back to the screen from the customization.
You have to call get by id in the bpm and attach the dataset. This effectively refreshes the screen

On Apr 27, 2015 5:03 AM, "simon@... [vantage]" <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p><p style="margin-bottom:0cm;"><span style="word-spacing:normal;">I’ll start at the

beginning, it’s been fairly common for us to use method directives,
and generally they work just fine.


However on occasion we have hit a problem were they don’t quite work. What happens in use is the method directives run but don't actually update the screens which means the users have to hit the refresh button to see the true picture, not the best thing but manageable.


However, I recently thought surely you must be able to get around this problem using a customisation and indeed you can, with one problem When saving their work the users get the mesage.


Row has been modified by another user and couldn’t be updated.


I’ve tried to get around this without any success.


Has anybody got any
pointers, documentation, in fact anything that might help me solve
this problem?


</div>
 


<div style="color:#fff;min-height:0;"></div>
Thanks Jose I'll give it a go

​You didn't mention what version you are on, but here is how to do it in ABL
DEFINE VARIABLE hSalesOrder AS HANDLE NO-UNDO.

/* CREATE A HANDLE FOR THE SALES ORDER BO */
RUN bo/SalesOrder.p PERSISTENT SET hSalesOrder.

​/* MAKE YOUR CHANGES HERE */​


/* RUN GET BY ID TO
​UPDATE THEÂ
COPY OF THE O
​RDER​
*/

RUNÂ GetByIDÂ IN hSalesOrder(INPUT orderNum,
{&output_dataset_SalesOrderDataSet}).



Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Mon, Apr 27, 2015 at 8:37 AM, simon@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p>Thanks Jose I&#39;ll give it a go</p>

</div><span>
 


<div style="color:rgb(255,255,255);min-height:0px;"></div>


We're on 9.05.702a
Thanks again Jose, but I still haven't been able to get this to work, here's the code I've tried, as you can see I'm trying apply it to JobMtl, any help would be greatly appreciated

DEF BUFFER bPart FOR PART.
DEF VAR hJobEntry AS HANDLE NO-UNDO.
DEF VAR lv-JobNum LIKE JobHead.JobNum.

RUN bo/JobEntry/JobEntry.p PERSISTENT SET hJobEntry.

FIND first ttJobHead NO-LOCK NO-ERROR.

IF AVAIL ttJobHead THEN
DO:

     ASSIGN lv-JobNum = ttJobHead.JobNum.

     FIND bPart WHERE bPart.Company = ttJobHead.Company
                              AND bPart.PartNum = ttJobHead.PartNum
                              AND bpart.UOMClassID = "PAPER"
                              NO-LOCK
                              NO-ERROR.

     FIND Part WHERE Part.Company = ttJobHead.Company
                              AND Part.PartNum = ipPartNum
                              AND part.UOMClassID = "PAPER"
                              NO-LOCK
                              NO-ERROR.

     IF AVAIL Part THEN
     DO:

          FIND JobMtl WHERE JobMtl.Company = ttJobHead.Company
                                        AND JobMtl.JobNum = ttJobHead.JobNum
                                        AND JobMtl.PartNum = ipPartNum
                                        NO-ERROR.

          IF AVAIL JobMtl THEN
          DO:
               ASSIGN JobMtl.EstScrapType = "Q".

          END.
     END.
END.

RUN GetByID IN hJobEntry(INPUT lv-JobNum, {&output_dataset_JobEntryDataSet}).
What part is not working? are you getting an error?


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Fri, May 15, 2015 at 4:01 AM, simon@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p></p><div style="font-family:Tahoma;font-size:medium;">Thanks again Jose, but I still haven&#39;t been able to get this to work, here&#39;s the code I&#39;ve tried, as you can see I&#39;m trying apply it to JobMtl, any help would be greatly appreciated</div><div style="font-family:Tahoma;font-size:medium;"><br></div><div style="font-family:Tahoma;font-size:16px;">DEF BUFFER bPart FOR PART.<br>

DEF VAR hJobEntry AS HANDLE NO-UNDO.

DEF VAR lv-JobNum LIKE JobHead.JobNum.


RUN bo/JobEntry/JobEntry.p PERSISTENT SET hJobEntry.


FIND first ttJobHead NO-LOCK NO-ERROR.


IF AVAIL ttJobHead THEN

DO:


    ASSIGN lv-JobNum = ttJobHead.JobNum.


    FIND bPart WHERE bPart.Company = ttJobHead.Company

                             AND bPart.PartNum = ttJobHead.PartNum

                             AND bpart.UOMClassID = "PAPER"

                             NO-LOCK

                             NO-ERROR.


    FIND Part WHERE Part.Company = ttJobHead.Company

                             AND Part.PartNum = ipPartNum

                             AND part.UOMClassID = "PAPER"

                             NO-LOCK

                             NO-ERROR.


    IF AVAIL Part THEN

    DO:


         FIND JobMtl WHERE JobMtl.Company = ttJobHead.Company

                                       AND JobMtl.JobNum = ttJobHead.JobNum

                                       AND JobMtl.PartNum = ipPartNum

                                       NO-ERROR.


         IF AVAIL JobMtl THEN

         DO:

              ASSIGN JobMtl.EstScrapType = "Q".


         END.

    END.

END.


RUN GetByID IN hJobEntry(INPUT lv-JobNum, {&output_dataset_JobEntryDataSet}).

</div><span class="ygrps-yiv-1884638230">
 


<div style="color:#fff;min-height:0;"></div>