O código abaixo renderiza naturalmente sob provocação do menu que eu criei para teste na SIGACTB. O arquivo fonte é '.prw'.
#INCLUDE "rwmake.ch"
User Function aula01()
local cVldAlt:=.T.
local cVldExc:=.T.
Private cPerg:="PEGZZ9"
Private cString:="ZZ9"
DbSelectArea("ZZ9")//nome da tabela em que estou trabalhando
DbSetOrder(1)
Pergunte(cPerg,.F.)
setKey(123,{||Pergunte(cPerg,.T.)}) //Seta a tecla f12 para acionamento dos parâmetros
AxCadastro(cString,"Cadastro de Pessoas",cVldExc,cVldAlt)
Set Key 123 to //Desativa a tecla F12 para acionamento dos parâmetros
Return
Entretanto, quando aciono o botão Incluir, aparece um erro, assim:
THREAD ERROR ([1100], Mautresim, PC-MEU) 05/08/2021 16:31:40
type mismatch on + on AXINCLUI(MATXATU.PRX) 25/08/2020 16:28:19 line : 520
[TOTVS build: 7.00.191205P-20201012]
Called from AXCADINC(MATXATU.PRX) 25/08/2020 16:28:19 line : 2196
Called from FWFORMBROWSE:EXECUTE(FWFORMBROWSE.PRW) 13/10/2020 16:57:59 line : 1142
Called from { || OSELF:EXECUTE("AXCADINC", 3, 0,"INCLUIR", 3,"","INCLUIR","", 3) }(FWFORMBROWSE.PRW) 13/10/2020 16:57:59 line : 575
Called from ::MSDIALOG:ACTIVATE
Called from FWMBROWSE:ACTIVATE(FWMBROWSE.PRW) 13/10/2020 16:57:59 line : 690
Called from FWMBROWSE(MSLIB.PRW) 13/10/2020 16:57:59 line : 10765
Called from MBROWSE(MSLIB.PRW) 13/10/2020 16:57:59 line : 170
Called from AXCADASTRO(MATXATU.PRX) 25/08/2020 16:28:19 line : 2173
Called from U_AULA01(PRIMEIRO.PRW) 05/08/2021 16:22:21 line : 11
Called from SIGAIXB(APLIB190.PRW) 13/10/2020 16:57:54 line : 231
Called from __EXECUTE(APLIB090.PRW) 13/10/2020 16:57:54 line : 654
Called from FWPREEXECUTE(FWPREEXECUTE.PRW) 13/10/2020 16:57:59 line : 79
Called from { || FWPreExecute('xpto', 'AULA01()', 3, '34', 'xxxxxxxxxx') }(FWUIMENUL.PRW) 13/10/2020 16:57:59 line : 197
Called from ::TWINDOW:ACTIVATE
Called from MSAPP:ACTIVATE(FWAPP.PRW) 13/10/2020 16:57:59 line : 755
Called from SIGACTB(APLIB000.PRW) 13/10/2020 16:57:54 line : 523