Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I track the EIP Insert, Change, or Delete?

EditInPlace

How do I track the EIP Insert, Change, or Delete?

by  Gaudalier  Posted    (Edited  )
I'd got a EIP browse on Invoice Details, and I needed to Update the some items stuff, so the total number of Products¦items must be:

TotalProductsItems -= DetailQuantity !(Inserting)
TotalProductsItems += DetailQuantity !(Deleting)

I need a way to update the product' file, so I choose to intercept the default delete record, and do it manually!

Here The way I did it:

Code:
CASE ACCEPTED()   !LocalObjects ->Browse On XXX. TakeEvent 2500
  OF SELF.INSERTCONTROL  
    LOC:REQUEST = 1   !This value is use in EIP
  OF SELF.CHANGECONTROL  
    LOC:REQUEST = 2
  OF SELF.DELETECONTROL  
    !SELF.WINDOW.UPDATE()
    LOC:REQUEST = 3
      CASE MESSAGE('Delete the selected record',|
        'Please Confirm',ICON:QUESTION,BUTTON:YES+BUTTON:NO,BUTTON:YES,1)
      OF BUTTON:YES
        DO DeleteDetails
        BRW1.ResetFromFile
        IF BRW1.RECORDS() = 0
          Do ClearTotals
        END
        SELECT(?LIST)
      OF BUTTON:NO
        SELECT(?LIST)
      END !END CASE MESSSAGE...
    CLEAR(LOC:REQUEST)
    RETURN !this is for overide the default DELETE action!
END

Adios Amigos!.
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top