Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Answered

Script to Update the text field in production

(0) ShareShare
ReportReport
Posted on by

Dear all,

 I have a Production environment with custom code deployed with multiple custom models.

I want to just update a Text field in Free Text Invoice making Text = Description for few posted Free Text Invoices as the user forgot to update the Text field when importing line from Data Management.

So do I have to package the Custom X++ Script with All-in-One Package consisting of Entire Source Code. Or I can create this package from a separate Development Environment with Only 1 model and 1 class as mentioned in this Microsoft Document.

Appreciate any tips..

  • Suggested answer
    Ameen1623 Profile Picture
    Ameen1623 on at
    RE: Script to Update the text field in production

    Thanks for reply Mohit. It worked for me

  • Suggested answer
    Ameen1623 Profile Picture
    Ameen1623 on at
    RE: Script to Update the text field in production

    Thanks Mariano. It worked

  • Suggested answer
    Mohit Rampal Profile Picture
    Mohit Rampal 12,554 Super User 2024 Season 1 on at
    RE: Script to Update the text field in production

    Hi Ameen, If you still face any issue, you can check this article. Its explained in detail about running custom scripts in production.

    dynamics365musings.com/.../

  • Ameen1623 Profile Picture
    Ameen1623 on at
    RE: Script to Update the text field in production

    Thank you so much for your valuable reply. I will try the same.

  • Verified answer
    RE: Script to Update the text field in production

    No, you must only include the newly created model for this purpose and upload it to the custom script form that you'll find in Dynamics 365 FO

  • Ameen1623 Profile Picture
    Ameen1623 on at
    RE: Script to Update the text field in production

    Dear Mariano,

                     Thanks for your valuable reply. here my doubt is while creating the package do I need to include all the custom models or only selecting the script model is enough? can you please help me in this regard.

    Thanks in advance.

    Ameen

  • Verified answer
    RE: Script to Update the text field in production

    I have used the custom script a few times as Microsoft explains in the docs, it works, a good option when you don't have alternatives. Create a new model with a single class with the code in the main method, take notice that if you have made a mistake, you'll need to write a new class in a new model, if you upload again the same model but with the class modified a warning message is shown explaining that the original class will be used (it won't overwrite the class). Of course, test it in a UAT environment with the data refreshed from the production environment before executing in the production environment

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,996 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,853 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans