/scripts/ahub.form.attachments.js
0

Script - Handle Error - VBA

Jan 23, 2017 at 03:11 PM

24

avatar image

Hi,

I'm having difficulties to set up my VBA code in order to handle error.

I'm using it to create data and the system send back the error : 'entry already exists'. I would like to set up something like this :

(See bold)

session.findById("wnd[0]/usr/ctxtBNKA-BANKS").Text = BANKS
session.findById("wnd[0]/usr/ctxtBNKA-BANKL").Text = BANKL

IF session.findById("wnd[0]").sendVKey 0 Sends back an error then

Stop script

End if


session.findById("wnd[0]/usr/txtBNKA-PROVZ").Text
session.findById("wnd[0]/usr/txtBNKA-PROVZ").Text = PROVZ
session.findById("wnd[0]/usr/txtBNKA-BANKA").Text = BANKA
session.findById("wnd[0]/usr/txtBNKA-STRAS").Text = STRAS
session.findById("wnd[0]/usr/txtBNKA-ORT01").Text = ORT01
session.findById("wnd[0]/usr/txtBNKA-BRNCH").Text = SWIFT
session.findById("wnd[0]/usr/txtBNKA-SWIFT").Text = BANKL
session.findById("wnd[0]/tbar[0]/btn[11]").press

Do you have any idea ? I having issue when using 'onerror'.

Thanks,

Martin.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers

Skip to Content