web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Copy Fixed Asset AL issue.

(0) ShareShare
ReportReport
Posted on by

Hi All,

I need to customize the Copy Fixed asset action such that when one click Copy Fixed Asset, the newly created asset will leave blank the field for serial since it's a unique field. 

I have checked the default code and I have realized that it's a report. After reviewing this report, I haven't seen any place it's attempting to insert serial.

What's the best way to achieve my goal.?

I have the same question (0)
  • Mohana Yadav Profile Picture
    61,248 Super User 2026 Season 2 on at

    Do you have a screenshot? what do you mean by leave blank the field for serial?

  • Verified answer
    Mohana Yadav Profile Picture
    61,248 Super User 2026 Season 2 on at

    I got what you mean now.

    You can use the below subscriber to make it blank.

    [EventSubscriber(ObjectType::Report, Report::"Copy Fixed Asset", 'OnOnPreReportOnBeforeFA2Insert', '', false, false)]

       local procedure OnOnPreReportOnBeforeFA2Insert(var FixedAsset2: Record "Fixed Asset"; var FixedAsset: Record "Fixed Asset");

       begin

           FixedAsset2."Serial No." := '';

       end;

  • Romryan Profile Picture
    on at

    Mohana,

    Am getting an error on OnOnPreReportOnBeforeFA2Insert event. Below is the error.

    The event 'OnOnPreReportOnBeforeFA2Insert' is not found in the target

  • Suggested answer
    Govinda Kumar Profile Picture
    2,310 Moderator on at

    It seems that the event Mohana mentioned is not available in the version you are using.

    pastedimage1683880977748v1.png

    pastedimage1683881233894v2.png

  • Verified answer
    Mohana Yadav Profile Picture
    61,248 Super User 2026 Season 2 on at

    you can try withy the below event.

       [EventSubscriber(ObjectType::Report, Report::"Copy Fixed Asset", 'OnAfterFixedAssetCopied', '', false, false)]

       local procedure OnAfterFixedAssetCopied(var FixedAsset2: Record "Fixed Asset"; var FixedAsset: Record "Fixed Asset");

       begin

           FixedAsset2."Serial No." := '';

           FixedAsset2.Modify();

       end;

  • Romryan Profile Picture
    on at

    Mohana,

    Thanks for enlightenment I have replaced OnOnPreReportOnBeforeFA2Insert with OnAfterFixedAssetCopied and it has worked. I have also added 

    FixedAsset2.Modify().
    I am closing this case.
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 595 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 364 Super User 2026 Season 2

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 331 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans