Skip to main content
Business Central forum
Answered

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

editSubscribe (0) ShareShare
ReportReport
Posted on by UG Leader

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

  • Community Member Profile Picture
    Community Member UG Leader 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 20,984 Super User 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 UG Leader 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 45,237 Super User 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 20,984 Super User 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

Helpful resources

Quick Links

What Motivates a Super User?

We know many of you visit the Dynamics 365 Community and Power Platform…

Demystifying Copilot with Georg Glantschnig…

Industry experts answer burning questions directly from our amazing Community…

Setting Up Knowledge Sources for Copilot…

Look at how configuring a comprehensive knowledge base is crucial…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,066 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 222,585 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,138

Product updates

Dynamics 365 release plans