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

Community site session details

Session Id :
Dynamics 365 Community / Forums / Finance forum / task macro paste task ...
Finance forum

task macro paste task not working properly

(0) ShareShare
ReportReport
Posted on by 10

I want to paste the data which is coppied on clipboard on one of the text box of my form using Paste task from Task Macro.

Is it possible in d365 operations.

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    299,509 Super User 2025 Season 2 on at
    RE: task macro paste task not working properly

    Hi Taral,

    If you have copied some text, you can paste it in a text control in Dynamics 365 for Finance and Operations. It is not possible to copy entire records using copy/paste. The characters pasted depends on the length of the text and the field in Dynamics 365.

  • taral13 Profile Picture
    10 on at
    RE: task macro paste task not working properly

    Hi Andre,

    Thanks for the reponse.

    yes my text is copied and copied text size is lesser than the field string size.

    but still paste is not working.

    if you want i can give my code snippet as well.

  • André Arnaud de Calavon Profile Picture
    299,509 Super User 2025 Season 2 on at
    RE: task macro paste task not working properly

    Hi Taral,

    What do you mean with a code snippet? You aren't using the keyboard?

  • taral13 Profile Picture
    10 on at
    RE: task macro paste task not working properly

    No

    i have some code written on my form's button click method and there i'm using Paste task to paste the text which is coppied.

  • André Arnaud de Calavon Profile Picture
    299,509 Super User 2025 Season 2 on at
    RE: task macro paste task not working properly

    I don't have experience in simulating a paste action in code. If you share your code, probably another volunteer might be able to help you.

  • Mea_ Profile Picture
    60,284 on at
    RE: task macro paste task not working properly

    What is the point to use paste at all? Just assign value to the control or data source field and call logic required instead of simulating paste behavior.

  • taral13 Profile Picture
    10 on at
    RE: task macro paste task not working properly

    Hi,

    Coppied values are not coming from system.

    i'm copying data from my local system and want to paste same in d365 online on one of my form's text box.

  • taral13 Profile Picture
    10 on at
    RE: task macro paste task not working properly

    please find below my code snippet for pasting the coppied text on clip board.

       [Control("Button")]

       class FetchWeight

       {

           /// <summary>

           ///

           /// </summary>

           public void clicked()

           {

               super();

               FormStringControl1.setFocus();

               //element.task(771); // 771 = copy task number in system.

               element.task(772); // 772 = paste task number in system.

               info(strFmt("%1",FormStringControl1.valueStr()));

           }

       }

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 Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

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

Leaderboard > Finance

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans