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>
/* CREATE A HANDLE FOR THE SALES ORDER BO */
RUN bo/SalesOrder.p PERSISTENT SET hSalesOrder.
/* RUN GET BY ID TO
RUNÂ GetByIDÂ IN hSalesOrder(INPUT orderNum,
{&output_dataset_SalesOrderDataSet}).
On Mon, Apr 27, 2015 at 8:37 AM, simon@... [vantage] <vantage@yahoogroups.com> wrote:Â<div> <p>Thanks Jose I'll give it a go</p> </div><span> <div style="color:rgb(255,255,255);min-height:0px;"></div>
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}).
Jose C Gomez
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'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</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>