Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Set a default template customer card

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

When creating a new customer you can use the template where you put in some fields and enter values which is great.

How can you apply this template as a default without going to the template, selecting and press ok. So i am able to just open up the customer card and the fields are filled with values from the template as default.

I know you can go in the customer table and use InitValue, but if the customer adds a field and value this wont apply, so looking for another solution.

What i have tried so far is opening the codeunit 8612 - Config. Template Management and copy some of the code and paste it into the customer page and then refactor the code so i would put hardcoded parameter that would use the template i want instead.
I wasn't able to make this work - Is there anyone who got a solution for this?

Thanks in advance,

*This post is locked for comments

  • keoma Profile Picture
    keoma 32,675 on at
    RE: Set a default template customer card

    please publish your code.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Set a default template customer card

    Thats what i tried from the start, but could not get the code to work.

  • keoma Profile Picture
    keoma 32,675 on at
    RE: Set a default template customer card

    ok, means you do not need an empty customer card anymore.

    for that edit page customer card and write the code into trigger No.-OnValidate, where you load the values from the template into the new created customer, followed by a currentpage.update.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Set a default template customer card

    I dont understand why i need another actionbutton because I was looking for a solution where I skip the process of clicking the a button.

    Why not just write the code in the customer card page as written above where the values is set from the template on new customer?

    I just had problem with completing writing the code, got stuck at something with the RecRef.

  • keoma Profile Picture
    keoma 32,675 on at
    RE: Set a default template customer card

    create a new actionbutton in page customer list. write needed code to create a new customer, where you set the values from the template, then open this new customer with page customer card.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans