Code Problem

DynamicUser
DynamicUser Member Posts: 178
Hi Friends
I am developing one codeunit in which data come to sales invoice from customized forms and table and ledger entries create as soon as user post the data.my problem is when i am putting the invoice filter into the codeunit which i have created it doesnot accept the invoice filter it accepts order,quote and Credt memo. i am calling the codeunit into 80 no codeunit .Please help me.

Comments

  • Luc_VanDyck
    Luc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Have a look at codeunits 81 or 82 how you need to call codeunit 80:
    WITH SalesHeader DO BEGIN
    
      CASE "Document Type" OF
        "Document Type"::Order:
          BEGIN
            Selection := STRMENU(Text000,3);
            IF Selection = 0 THEN
              EXIT;
            Ship := Selection IN [1,3];
            Invoice := Selection IN [2,3];
          END;
        "Document Type"::"Return Order":
          BEGIN
            Selection := STRMENU(Text002,3);
            IF Selection = 0 THEN
              EXIT;
            Receive := Selection IN [1,3];
            Invoice := Selection IN [2,3];
          END ELSE
            IF NOT
               CONFIRM(
                 Text001,FALSE,
                 "Document Type")
            THEN
              EXIT;
      END;
    
      SalesPost.RUN(SalesHeader);
    END;
    
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)