Options

Problems using recordref,fieldref... JOKER

AitorEGAitorEG Member Posts: 342
Hi everyone,

This is my first time using recordrefs and all the related issues, so may be I am asking about somthing obvius. First of all, I'll show a piece of code:
LOCAL RecorrerRutas()
//190212-01
 lGeneralSetup.GET();
 lRecordFilerelation.RESET;
 IF lRecordFilerelation.FINDSET THEN REPEAT
  lRegistroREF.OPEN(lRecordFilerelation."Object ID.");
  lCampoREF := lRegistroREF.FIELD(lRecordFilerelation."Field ID Posting Date");
  lCampoREF.SETFILTER('>%1',CALCDATE('-<lGeneralSetup."Day-to Check">',WORKDATE));
  IF lRegistroREF.FINDSET THEN REPEAT
    lDocNoRef := lRegistroREF.FIELDINDEX(1);
    IF NOT Signed(lDocNoRef.VALUE , lRecordFilerelation."Object ID.") THEN//comprobar firmado
      IF NOT Sent(lDocNoRef.VALUE,lRecordFilerelation."Object ID.") THEN//comprobar enviado a firmar   
        ComprobarRegistros;
  UNTIL lRegistroREF.NEXT =0;
 UNTIL lRecordFilerelation.NEXT =0;

LOCAL Signed(pDocNo : FieldRef;pRecType : Integer) : Boolean
lSentNotReceivedDocs.RESET;
IF lSentNotReceivedDocs.GET(pRecType,pDocNo) THEN
  EXIT(TRUE)
ELSE
  EXIT(FALSE);

LOCAL Sent(pDocNo : FieldRef;pRecType : Integer) : Boolean
lSentReceivedDocs.RESET;
IF lSentReceivedDocs.GET(pRecType,pDocNo) THEN
  EXIT(TRUE)
ELSE
  EXIT(FALSE);

Variables:
lCampoREF FieldRef
lRegistroREF RecordRef
lDocNoRef FieldRef

When I compile I can see this error in the call to "Signed" function:

pastedimage1550738771514v1.png


Probably I am doing something else worng because as I've said, I am new in this issues...

Any other clarification you can ask me, I know that it's quite hard to help without knowing waht it's the aim of the development

Thank you very much

Best Answer

Answers

  • Options
    AitorEGAitorEG Member Posts: 342
    in the parameter for signed function pDocNo, use the type variant. replied you on DUG as well :)

    Thank yuo, appreciated!!!
Sign In or Register to comment.