Showing posts with label Comment Splite. Show all posts
Showing posts with label Comment Splite. Show all posts

Thursday, December 22, 2016

How Do I Split Comments or Copy from somewhere and paste in comments.

How Do I Split Comments or Copy from somewhere and paste in comments.
Hi all,
    Today i came across with different type of requirement, where someone asked in community forum, How Do I Split Comments or Copy from somewhere and paste in comments.

This solution for Contact comments, you can use similar in your sales documents also, only you have to change the Record variable as per your requirement.

To achieve these requirement i created a Page of card type and two functions and two global variables.

Technology
    Microsoft Dynamics NAV 2017

Scenarios
   Demo 1 – Binesh creates a new page i.e. Name “Wrap Text” ID 50246.
   Demo 2 – Binesh calls the earlier created page in comments action.

Demo 1 – Binesh creates a new page i.e. Name “Wrap Text” ID 50246.
To achieve this follow the bellow steps:

Step 1:        Open Development environment and create a new page.
Step 2:       Create Global variables i.e.:

Name
DataType
Subtype
Length
CommentTxt
Text


RMCommentG
Record
Rlshp. Mgt. Comment Line


Step 3:       Design your page, see the bellow screenshot for better understanding.

               
              
                            
Step 4:       Create two functions in this page, see the bellow screenshot.

      
     

Step 5: In Function GetRMParam pass the record variable of "Rlshp. Mgt. Comment Line" as var true.
        And
In Function RMCommentEditor function declare local variables, See bellow screenshot.




Step 6:       Write the code, see the bellow screenshot







Step 7 :      Now call the function in OnQueryClosePage Action of this page,
See the bellow screenshot.

  


Step 8:       Now Open the Rlshp. Mgt. Comment Sheet  Page, After that open Page Action, and then create an Action i.e. Wrap Comment, See the bellow screenshot.




Step 9:       Go to C/Al Editor of Wrap Comment Action, and declare a local variable of page type that are earlier created, and pass the record parameters and then Run the page, See the bellow screenshot for better understanding.




Step 10: Testing solution -> Open Windows/Web client -> Open Contact List page -> select any contact -> click on Comments Action - > you will get Comment page -> In comment page if you have more comments, or you want to use copy, paste then click on Wrap Comment Action -> A Comment Editor page will open, In that editor you can paste your comments (or) type your comments -> After that click OK or Close button -> Comments updated in comment page.
For better understanding see thee bellow screenshot.














Popular Posts