• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

Suppress Add

Can anyone let me know where to put a command to suppress the addition of a
grid line to a database on a header detail form when the user presses OK.
I am doing a suppress add on a given condition within the event ADD GRID
RECORD TO DB - BEFORE.

Any help would be appreciated. Thanks.


______________________
Kenneth Elder
Lead Analyst
Hartmann, Inc.
Phone: (615)453-3220
Fax: (615)443-4619

NT 4.0 SP5, One World 7332, SP11.3, SQL 7.0 SP2, MDAC 2.5
 

Zoltan_Gyimesi

Legendary Poster
Hi Kenneth,

You already exactly answered yourself.
Simply put a "Suppress Add" :)) System Function call ("General" Category) with your logic into the "Add Grid Rec to DB - Before" :)) Grid event.
It should work.

Zoltán

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 

Bill_Feeney

Active Member
Ken,
I believe this depends on what mode your form is in. If it is in Add mode
you are in the right ER. However, if you are in Update mode you should put
the suppress in the Update Record to Database - Before.
If you have access to the B7332 documentation Cd look at the OneWorld
Development Tools section B pages 19 thru 26 for the process flow of Header
Detail Forms.

Bill Feeney
JDE Technical Developer
B733.2, SP 13.1, Unix, Oracle 8.1.6




Bill Feeney
B7332 SP 13.1 Sun Unix Oracle 8.1.6
 

Zoltan_Gyimesi

Legendary Poster
Re: RE: Suppress Add

Hi Ken & Bill,

I checked the mentioned documentation (again ;-).
Excuse me Bill, but I do not agree with you.
I have never seen the SuppressAdd Systemfunction call elsewhere than in "Add Grid Record to DB - Before" event.
Please, let me copy this topic (SuppressAdd) from the OneWorld online help:
====================Copy Begins=======================================
SuppressAdd

Purpose

Prevents a database record from being added by the interactive runtime engine.

Parameters

None.

Return Values

None.

Special Handling Instructions and Prerequisites

This system function is used to prevent a form record or a grid record from being added. To prevent the addition of a form record this system function must be called during the Add Record to DB - Before ER. Any calls to the system function prior to that time will be ignored.
To suppress the addition of a grid record this system function must be called during the Add Grid Record to DB - Before ER. Any calls to the system function prior to that time will be ignored.

Related Topics

SuppressDelete
SuppressFind
SuppressUpdate
====================Copy Ends=========================================
Please check attentively the "Special Handling Instructions and Prerequisites" paragraph.

Ken please, let us know your results or if you have further problem with this issue (or with other ;-) Thanks.

Zoltán


B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 

Bill_Feeney

Active Member
RE: RE: Suppress Add

Hi Zoltan,
I certainly wouldn't want to argue with you :)
The reason I suggested to put the suppress in the update ER is in the
mentioned document it says on page B-23/24 when the OK button is clicked it
performs the add or update event rules depending on the mode the form is in.

I was thinking from Ken's question he had coded the suppress add function
and it didn't work as expected.





Bill Feeney
JDE Technical Developer
B733.2, SP 13.1, Unix, Oracle 8.1.6




Bill Feeney
B7332 SP 13.1 Sun Unix Oracle 8.1.6
 

Adrian_Chimirel

Legendary Poster
Hey Ken,
It seems that your topic generated a hot scholastic dialog!
We would really appreciate your participation/clarification with a rephrased/higher level of detail question :)
Thank you,
Adrianation

LIVE: B732.1 SP12.2, Oracle 806, FormScape 2.1
SANDBOX: Xe SP15 & Update1, Oracle 8i
RS/6000, Citrix
 

Zoltan_Gyimesi

Legendary Poster
Re: RE: RE: Suppress Add

Hi Bill,
I also certainly wouldn't want to argue with you :) but maybe I do with the documentation.

At first, on Header and Headerless Detail forms I can update and delete records as well as add records in update mode.

My questions are (not to you but to the author of the documentation):
1.) How can I handle added and updated records separately without adding work columns and special ER logic to the form to distinquish the added and modified records?
2.) Why does "Add Grid Record to DB - Before ER" (and the other ADD events) have functionality in add mode and does not have in update mode?
3.) Why to handle added records in the Update (instead of Add) events in update mode while I can handle delete records in the Delete events?
4.) Which is the true, the Appendix B or the On-Line help?

I always see SuppressAdd calls in the Add Before event where OW handles the data with Master Business Functions. In these case, the record update and record delete are also suppressed the same way with the appropriate SysFunc calls in the related events as well as record addition. Could it be possible that the SuppressUpdate SysFunc call in the Update Before event will prevent the record addition in Update Mode while the SuppressAdd SysFunc call in the Add Before event will do it in Add Mode??????????? Does it have any sense?????

Now I am really very curious to the truth without creating junk data and junk applications to experiment it myself!

At last, let me copy the "Add Grid Record to DB - Before ER" event topic here from the OneWorld On-Line Help.
===========================Copy Starts================================
Add Grid Record to DB - Before

Description

Event Rules attached to this event occur after you press OK to add a grid line record to the database, but before the record is actually added.

Available On

Headerless/Detail
Header/Detail

Available Objects

All objects are available. However, values have already been propagated into the BC’s so those are the ones that should be modified to affect the record in the database.

Typical Usage

Use this when you want the behavior to affect the saved record. For example, use it to time-stamp a record entered from the grid into the database.
If no records are to be added, use the SuppressAdd business function.

Additional Notes

This event differs from the corresponding event, UpdateGridRecordtoDB, because the attached behavior occurs relative to the addition of a new record to the database.

Processing Sequence

The BC’s are set up just as they are to be added to database.
Run Add Grid Record to DB - Before.

J. D. Edwards Standards

This event works with grid records only. To work with form records use the corresponding form events.
===========================Copy Ends==================================
Please, read attentively the "Additional Notes" paragraph.

Regards,
Zoltán

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 
The problem I was encountering was on the header portion of the add. My
add suppress was working find on the Grid, but I was not suppressing the
add in the form section. Therefore, it was adding a record with the header
information. Thanks for your input.



From: Adrian_Chimirel <achimirel@hotmail.com>@jdelist.com on 05/29/2001
07:40 PM
 

Zoltan_Gyimesi

Legendary Poster
Hi Ken,
Glad to read that your issue was resolved.
Thanks for your update.
It seems so that all of us misunderstood your problem and thought that the question is how to SuppressAdd on the Grid.

Zoltán
P.S.: Adrian, thank you also the demand for the clarification. It resolved really the problem (at least for me :)

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 
Top