Skip to main content

Notifications

Small and medium business | Business Central, N...
Answered

How to make field empty when the action "copy job" from job list ? any idea!!

Posted on by Microsoft Employee

how we can make a field empty ex: starting date when we created a job from copying job

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to make field empty when the action "copy job" from job list ? any idea!!

    Thank you all issue solved

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,063 Super User 2024 Season 1 on at
    RE: How to make field empty when the action "copy job" from job list ? any idea!!

    Hi,

    Please show your Action button's code how you did it

    Thanks.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to make field empty when the action "copy job" from job list ? any idea!!

    Thank you for the reply.

    but what I am looking is a  for a new created job some fields need to empty

    which has values in the original job.

    I have modified the action but I am still getting the same value in the original field.

  • Verified answer
    Mohana Yadav Profile Picture
    Mohana Yadav 58,880 Super User 2024 Season 2 on at
    RE: How to make field empty when the action "copy job" from job list ? any idea!!

    you have to subscribe to OnAfterCopyJob publisher of Copy Job codeunit like below

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"Copy Job", 'OnAfterCopyJob', '', false, false)]

       local procedure OnAfterCopyJob(var TargetJob: Record Job; SourceJob: Record Job);

       begin

           TargetJob."Starting Date" := 0D;

       end;

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,063 Super User 2024 Season 1 on at
    RE: How to make field empty when the action "copy job" from job list ? any idea!!

    Hi,

    If you want to pass the <Blank> value to your starting date field.

    "Starting Date" := 0D

    Thanks.

  • Suggested answer
    Amit Baru Profile Picture
    Amit Baru 3,025 on at
    RE: How to make field empty when the action "copy job" from job list ? any idea!!

    Hi,

    Write code on Copy Job button for blank the Start Date field.

    Regards

    Amit Sharma

    www.erpconsultors.com

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,900 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,275 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans