cancel
Showing results for 
Search instead for 
Did you mean: 

Delete Record

Former Member
0 Kudos

Hi

  I have form having fields Code,Name . I want when user tries to delete record it should check that Code does not exist in another table say TEMP . If exists user should not be able to delete record.

Thanks

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Sunny,

As Kartheek said you can use Transaction Notification only if your form is a UDO form otherwise you have to do it in the code.

You can do it like (assuming you are providing user Right Click Delete Row Facility ) When user select delete row option --> In BeforeAction event run your query to check if the code for selected line exists in Temp table . If exists make bubble event = false else allow to delete row.

Regards

pvsbprasad
Active Contributor
0 Kudos

Hi,

Try this,

1. Through Transaction Notification

2. Trough Code->Write a query  to check in TEMP table. If exists make Bubble event = False.

Regards,

Prasad

Former Member
0 Kudos

hi.

what prasad said is currect

you can achieve this one through the sdk code..

in menu event

        If pVal.BeforeAction = False Then

            If pVal.MenuUID = "1293" Then

                oForm = SBO_Application.Forms.ActiveForm

                Try

                    If (oForm.UniqueID = "VADISS") Then

                        oForm = SBO_Application.Forms.Item("VADISS")

                            'save code number in integer=code

                            'here run the query for value is existing in temp table or not

                            use if conditon

                              if()then

                               else

                        bubbleevent=false

                             end if

Former Member
0 Kudos

Hi

  can u please help me with code

Thanks

Former Member
0 Kudos

Hi Sunny,

If the form is binded to UDO and user is using delete option of the UDO, then you can write stored procedure(Transaction Notification).

Regards

Kartheek

Former Member
0 Kudos

Hi

  It is not a UDO Object , i have created form with No Object

Thanks