Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

Procedures with Attributes (Event / Internal) does not work #1

Closed
365businessdev opened this issue Jun 12, 2020 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@365businessdev
Copy link
Owner

365businessdev commented Jun 12, 2020

Events (Subscriber/Publisher) are not recognized/skipped when running cmds "Generate markdown documentation[...]"

Support for internal procedures would be nice :) At the moment it does not create documentation block ///

Original reported from rating by Christian Ziepel

@365businessdev 365businessdev added bug Something isn't working need more info Need more Information and removed bug Something isn't working labels Jun 12, 2020
@365businessdev
Copy link
Owner Author

Sorry, we're unable to reproduce. If event is not local (see #2 ) Events (Internal, Business, Integration) and other Attributes (e.g. Obsolete) will be exported.

Used this code for testing:

/// <summary> 
/// Codeunit MyCodeunit2 (ID 50102).
/// </summary>
codeunit 50102 MyCodeunit2
{
    /// <summary> 
    /// Description for DoSomethingParam.
    /// </summary>
    /// <param name="param1">Parameter of type Text.</param>
    /// <param name="param2">Parameter of type Integer.</param>
    /// <returns>Return value of type Boolean.</returns>
    [Obsolete('This is an obsolete reason.')]
    procedure DoSomethingParam(param1: Text; param2: Integer): Boolean
    begin

    end;

    /// <summary> 
    /// Description for OnAfterCalcInvoiceSubscriber.
    /// </summary>
    /// <param name="SalesHeader">Parameter of type Record "Sales Header".</param>
    /// <param name="NewInvoice">Parameter of type Boolean.</param>
    [EventSubscriber(ObjectType::Codeunit, Codeunit::"Sales-Post", 'OnAfterCalcInvoice', '', false, false)]
    procedure OnAfterCalcInvoiceSubscriber(SalesHeader: Record "Sales Header"; var NewInvoice: Boolean)
    begin

    end;
}

Could you pls provide example code to reproduce?

@MAC-Christian
Copy link

I found out that is not related to attributes. An underline in procedure name is causing this issue. We use an underline in Subscriber name to separate publisher name from subscriber task.

procedure GetHistory_OnAfterGetRecord()
begin
end;

@365businessdev
Copy link
Owner Author

Ok, thank you!
We will check and fix in the next version.

@365businessdev 365businessdev added bug Something isn't working and removed need more info Need more Information labels Jun 16, 2020
sirhc101 pushed a commit that referenced this issue Jun 22, 2020
sirhc101 pushed a commit that referenced this issue Jul 2, 2020
@365businessdev
Copy link
Owner Author

Fixed with #6 Version 0.3.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants