Skip to main content

Notifications

Announcements

No record found.

Business Central forum
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 20,991 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 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 51,686 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,991 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

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,584 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,864 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans