This worked perfect! Putting it back together here's the code:
Find First GLJrnGrp Where GLJrnGrp.Company = Cur-Comp
And GlJrnGrp.GroupID = groupID
No-lock No-Error.
IF DCD-UserID = GLJrnGrp.CreatedBy
Then DO:
define variable body as character no-undo.
define variable body_cnt as integer no-undo.
assign body = body + 'This GJ journal group was created by you. Groups are not allowed to be posted by the created. Another user willl need to review and post this group.~n~nThank You.'.
{lib/PublishEx.i &ExMsg = body
&ExType = {&MESSAGE_ERR}
}
End.
Find First GLJrnGrp Where GLJrnGrp.Company = Cur-Comp
And GlJrnGrp.GroupID = groupID
No-lock No-Error.
IF DCD-UserID = GLJrnGrp.CreatedBy
Then DO:
define variable body as character no-undo.
define variable body_cnt as integer no-undo.
assign body = body + 'This GJ journal group was created by you. Groups are not allowed to be posted by the created. Another user willl need to review and post this group.~n~nThank You.'.
{lib/PublishEx.i &ExMsg = body
&ExType = {&MESSAGE_ERR}
}
End.
--- In vantage@yahoogroups.com, "netrippers" <osen.tom@...> wrote:
>
> Bruce,
>
> Finally got back to this. You need to do 2 things.
>
> 1) You need to put some other system defined condition to go along with your advanced code. Without this the custom code wasn't being written to the .p. So the custom code never fired. This may be a bug at my level 9.05.701
> 2) You need to fire of the error message in the custom code.
>
> Then Do:
> define variable body as character no-undo.
>
>
> define variable body_cnt as integer no-undo.
> assign body = body + 'This GJ journal group was created by you. Groups are not allowed to be posted by the created. Another user willl need to review and post this group.~n~nThank You.~n~nEpiocr 9'.
>
>
> {lib/PublishEx.i &ExMsg = body
> &ExType = {&MESSAGE_ERR}
>
> }
>
>
>
>
>
> --- In vantage@yahoogroups.com, "brucewbrannan" <bruce.brannan@> wrote:
> >
> > I'm still at a loss with this. All of the code I've tried always denies posting whether the DCD-UserID is the same or not. How can I verify what it is being compared to, whether it be the entire GLJrnGrp table or the single currently opened record trying to be posted?
> >
> > I have the Epicor training manuals on BPM but they are very lacking in detail. Is there somewhere else I can study to figure this out?
> >
> > Thanks again!
> >
> > --- In vantage@yahoogroups.com, "brucewbrannan" <bruce.brannan@> wrote:
> > >
> > > I'm using the GLJrnGrp.PostGroupJournals, Pre-Processing to try to prevent the user who created the Journal Group from Posting the Journal Group by throwing an exception message when DCD-UserID = GLJrnGrp.CreatedBy. It throws the message regardless of whether the condition is true or false.
> > >
> > > For the condition (custom) I have:
> > >
> > > for each GLJrnGrp where DCD-UserID = GLJrnGrp.CreatedBy. end.
> > >
> > > Any ideas why this doesn't work? Or is there a better way? Also, we're using 8.03.409.
> > >
> > > I've also read that you can use messageboxes to display data in fields, like it would be nice if I could simply show a message with what is currently in DCD-UserID and GLJrnGrp.CreatedBy, just so I now what is actually being compared. I just don't know how to create the message with fields.
> > >
> > > Thanks!
> > >
> >
>