Alguem poderia me ajudar com esta função, eu não consigo solucionar este erro


Set Field_Validate_msg Field Clientes.Identidade to get_validateCnpjCpf


Function Valida_Documento Integer iField String sVal Returns Integer
Integer iRet iOK
String sTipo

Get Field_Current_Value Field Clientes.Tipo to sTipo

If ((Length(Trim(sVal))) = 11 and (sTipo = "F")) Get fCPF sVal to iOk

If ((Length(Trim(sVal))) = 14 and (sTipo = "J")) Get fCGC sVal to iOK

If (sVal <> "") Begin
Move (iOK = 0) to iret
If (iret) Begin
If (sTipo = "F") Error 306 "CPF Invalido!"
Else Error 306 "CNPJ Invalido!"
End
End
Function_Return iret
End_Function

ERROR: 4306 Referência posterior não resolvida GET_FCGC ON LINE: 98 (70794) OF FILE: E:\Sisusaflex\DDSrc\cClientesDataDictionary.dd