Method Directive can't Blank Date and receive message!

Thanks Greg that worked a treat!

--- In vantage@yahoogroups.com, "Rodzewicz, Greg" <grodzewicz@...> wrote:
>
> Madgett1,
>
> Publishing the exception will stop the database transaction. Try publishing an info message instead.
>
> {lib/PublishInfoMsg.i &InfoMsg = '"Selected the ''Ship To'' before entering the ''Need By Date''"'}.
>
> Thanks,
>
> Greg Rodzewicz
> Developer
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of madgett1
> Sent: Monday, May 14, 2012 8:52 AM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Method Directive can't Blank Date and receive message!
>
>
>
> I have a set up a method directive for SalesOrder.ChangeNeddByDate. Pre-Processing method which is forwarded to the procedure actions/SalesOrder.p/ChangeNeedByDateBefore_3442. The code is as follows:
>
> procedure ChangeNeedByDateBefore_3442:
> define input-output parameter dataset for SalesOrderDataSet.
> define input-output parameter cTableName as character.
> {&TRY_PRIVATE}
>
> Find FIRST ttOrderHed WHERE LOOKUP(ttOrderHed.Rowmod,'A,U') > 0 NO-ERROR.
>
> IF AVAIL ttOrderHed THEN DO:
> IF ttOrderHed.ShipToNum = "" THEN DO:
>
> ASSIGN ttOrderHed.NEEDBYDATE = ?.
>
> {lib/publishex.i &exmsg = '"Selected the ''Ship To'' before entering the ''Need By Date''"' }.
>
> {&THROW_PRIVATE}.
> END.
> END.
>
> {&CATCH_PRIVATE}
> end procedure.
>
> Now I get the message but the date isn't blanked out, If I comment out the message the date is blanked out, but obviously no message.
>
> I've tried different procedures for each but no joy!
>
> Does anyone know of a way of getting the date blanked and the message?
>
>
> ________________________________
> CONFIDENTIALITY NOTICE - This e-mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the person to whom this e-mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. Any commodities, technology or software exported in this e-mail are being exported from the United States in accordance with export administration regulations, diversion contrary to USA law is prohibited.
>
>
> [Non-text portions of this message have been removed]
>
I have a set up a method directive for SalesOrder.ChangeNeddByDate. Pre-Processing method which is forwarded to the procedure actions/SalesOrder.p/ChangeNeedByDateBefore_3442. The code is as follows:

procedure ChangeNeedByDateBefore_3442:
define input-output parameter dataset for SalesOrderDataSet.
define input-output parameter cTableName as character.
{&TRY_PRIVATE}

Find FIRST ttOrderHed WHERE LOOKUP(ttOrderHed.Rowmod,'A,U') > 0 NO-ERROR.

IF AVAIL ttOrderHed THEN DO:
IF ttOrderHed.ShipToNum = "" THEN DO:

ASSIGN ttOrderHed.NEEDBYDATE = ?.

{lib/publishex.i &exmsg = '"Selected the ''Ship To'' before entering the ''Need By Date''"' }.

{&THROW_PRIVATE}.
END.
END.

{&CATCH_PRIVATE}
end procedure.

Now I get the message but the date isn't blanked out, If I comment out the message the date is blanked out, but obviously no message.

I've tried different procedures for each but no joy!

Does anyone know of a way of getting the date blanked and the message?
Madgett1,

Publishing the exception will stop the database transaction. Try publishing an info message instead.

{lib/PublishInfoMsg.i &InfoMsg = '"Selected the ''Ship To'' before entering the ''Need By Date''"'}.

Thanks,

Greg Rodzewicz
Developer

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of madgett1
Sent: Monday, May 14, 2012 8:52 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Method Directive can't Blank Date and receive message!



I have a set up a method directive for SalesOrder.ChangeNeddByDate. Pre-Processing method which is forwarded to the procedure actions/SalesOrder.p/ChangeNeedByDateBefore_3442. The code is as follows:

procedure ChangeNeedByDateBefore_3442:
define input-output parameter dataset for SalesOrderDataSet.
define input-output parameter cTableName as character.
{&TRY_PRIVATE}

Find FIRST ttOrderHed WHERE LOOKUP(ttOrderHed.Rowmod,'A,U') > 0 NO-ERROR.

IF AVAIL ttOrderHed THEN DO:
IF ttOrderHed.ShipToNum = "" THEN DO:

ASSIGN ttOrderHed.NEEDBYDATE = ?.

{lib/publishex.i &exmsg = '"Selected the ''Ship To'' before entering the ''Need By Date''"' }.

{&THROW_PRIVATE}.
END.
END.

{&CATCH_PRIVATE}
end procedure.

Now I get the message but the date isn't blanked out, If I comment out the message the date is blanked out, but obviously no message.

I've tried different procedures for each but no joy!

Does anyone know of a way of getting the date blanked and the message?


________________________________
CONFIDENTIALITY NOTICE - This e-mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the person to whom this e-mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. Any commodities, technology or software exported in this e-mail are being exported from the United States in accordance with export administration regulations, diversion contrary to USA law is prohibited.


[Non-text portions of this message have been removed]