Hello Everyone,
I did solve this.
Linda provided me with an answer that worked fine. Parts of the code resembled yours.
From method Directive I had to write the code in the advanced window where you create the actions.
I actually used post-processing and SalesOrder.CheckPartRevisionChange (That's the method to watch for according to the tracing option.)
Thanks.
Sebastien.-
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of NigelK
Sent: July-12-10 10:57 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: validating a condition
Hi Sebastien,
Not sure if you've solved this yet but just in case:
Create a Pre-processing Directive against the SalesOrder.ChangePartNum BO.
Add an action: synchronously execute <4GL code> record nothing
The code would be:
find first ttOrderDtl where ttOrderDtl.RowMod = 'A' or ttOrderDtl.RowMod = 'U' no-error.
if available ttOrderDtl then do:
find first Part where Part.Company = ttOrderDtl.Company and Part.PartNum = ttOrderDtl.PartNum no-lock no-error.
if not available Part then return.
if Part.Character01 NE "" then do:
{lib/PublishInfoMsg.i &InfoMsg = "'Part.Character01 = ' + Part.Character01"}
end.
if Part.Character01 = "" then do:
{lib/PublishInfoMsg.i &InfoMsg = "'Part.Character01 is Empty.'"}
end.
end.
HTH,
Nigel.
I did solve this.
Linda provided me with an answer that worked fine. Parts of the code resembled yours.
From method Directive I had to write the code in the advanced window where you create the actions.
I actually used post-processing and SalesOrder.CheckPartRevisionChange (That's the method to watch for according to the tracing option.)
Thanks.
Sebastien.-
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of NigelK
Sent: July-12-10 10:57 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: validating a condition
Hi Sebastien,
Not sure if you've solved this yet but just in case:
Create a Pre-processing Directive against the SalesOrder.ChangePartNum BO.
Add an action: synchronously execute <4GL code> record nothing
The code would be:
find first ttOrderDtl where ttOrderDtl.RowMod = 'A' or ttOrderDtl.RowMod = 'U' no-error.
if available ttOrderDtl then do:
find first Part where Part.Company = ttOrderDtl.Company and Part.PartNum = ttOrderDtl.PartNum no-lock no-error.
if not available Part then return.
if Part.Character01 NE "" then do:
{lib/PublishInfoMsg.i &InfoMsg = "'Part.Character01 = ' + Part.Character01"}
end.
if Part.Character01 = "" then do:
{lib/PublishInfoMsg.i &InfoMsg = "'Part.Character01 is Empty.'"}
end.
end.
HTH,
Nigel.
--- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, "Sebastien" <sebastien.jean-felix@...> wrote:
>
> Hello everyone,
>
> I hope somebody can help me with this.
>
> I would like to create a BPM or customization that does the following:
>
> -User adds part to sales order line
> -code checks if feild Character01 from Part is empty or not
> - If field is empty do nothing else display feild content in a message box.
>
> I hope that's clear enough.
>
>
> I tried using a BPM but I can't get it to work, probably because I have no knowledge of 4GL programming. I appreciate the help.
>
>
> Sebastien.-
>
________________________________
AVIS IMPORTANT: Cette transmission ?lectronique est strictement r?serv?e ? l'usage de la (des) personne(s) ? qui elle est adress?e et contient des informations privil?gi?es et confidentielles. Toute divulgation, distribution, copie, ou autre utilisation de cette transmission par une autre personne est strictement prohib?e. Si vous avez re?u ce courriel par erreur, veuillez s'il vous pla?t en aviser imm?diatement l'exp?diteur par courriel et d?truire tout exemplaire ou copie de la transmission originale.
WARNING: This electronic transmission contains confidential information, intended only for the person(s) named above, and is privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or any other use of this email is strictly prohibited. If you have received this transmission by error, please notify us immediately by return email and destroy the original transmission immediately and all copies thereof.
[Non-text portions of this message have been removed]