Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

How to fix Time Unit field (msdyn_timeunit) for Price List

Posted on by 215

Hello,

I am not able to pick a time unit when creating a new Price List. By default there is a time unit called "Hour". Because I am maintaining a German system, I wanted to change the wording. The issue seems to occour after modifying / deleting / creating Unit Groups and / or Units.

When creating a new Price List, the field "Time Unit" is prefilled with a value "(kein Name)" which means, there is no name specified. It is strange, that the field isn't just empty when the form is loaded.

New-Price-List.JPG

When using the Lookup function for the time unit, it says, that there are no time units available.

Empty-unit-search.JPG

When looking at Settings -> Product Catalog -> Unit Groups there are Units and unit groups defined:

Unit-Group-Search.JPG

Units-for-unit-Group.JPG

I already spent several hours on this issue. I assume that the original Hour unit was removed from the System causing this problem. Does anybody have a hint how to fix the time unit for Price List?

Sunny greetings

*This post is locked for comments

  • Mario N Profile Picture
    Mario N 95 on at
    RE: How to fix Time Unit field (msdyn_timeunit) for Price List

    Thanks! I tested the resolution today and it worked perfectly well!

  • Verified answer
    RE: How to fix Time Unit field (msdyn_timeunit) for Price List

    Hello

    You should be able to use any language labels for units and unit groups. However, deleting "Time" unit group record or the "Hour" unit record can make PSA unstable. If you have already deleted it, the steps to fix is as below:

    1. Please recreate a Time unit group with a base unit as Hour using any language labels as you need to

    2. Go to Advanced Find and retrieve all columns from the "Transaction Type" entity where Transaction Class="Time". Update the rows for Sales Contract, Cost, Unbilled Sales and Billed Sales for the fields unit and unit group to records by the corresponding to "Hour" and "Time" in the language you use.

    This should populate the Time Unit dropdown on the price list. Hope this helps!

  • Mario N Profile Picture
    Mario N 95 on at
    RE: How to fix Time Unit field (msdyn_timeunit) for Price List

    Hi Simon,

    Did you find a way to create a time unit manually?

    Thanks and BR

    Mario

  • RE: How to fix Time Unit field (msdyn_timeunit) for Price List

    Thanks for the reply. That did not fix it.

    Also, when comparing two working instances, Guid for "Hour" differs.

    When further tracking the JavaScript I end up in Web Resource 'msdyn_/Common/Models/TransactionType.js'. Dynamics CRM seems to set up transaction types during setup for: Time, Expense, Material, Milestone and Fee.

    When looking at the script in my previos post, the script seems to read the default value from somewhere with dataContext.read(). I am not able to figure out, where it reads the default value from, what dataContext means and so on.

    Will try a little more.

  • Suggested answer
    Guido Preite Profile Picture
    Guido Preite 54,081 Super User 2024 Season 1 on at
    RE: How to fix Time Unit field (msdyn_timeunit) for Price List

    Hi Simon,

    the default values probably are contained inside that script as well. If you have access to another CRM instance where "Hour" unit is not deleted, get the Guid of that unit (is inside the url of the email link) and try to create a unit in your original instance with the same Guid, at least the lookup should back to work. The ideal is to re-create also with the original name, but you can try also to recreate (keeping the same Guid) with the German name and see the behavior

  • RE: How to fix Time Unit field (msdyn_timeunit) for Price List

    I was able to reproduce it: If the Unit Group "Time" is deleted from Dynamics, you are in deep troubles.

    By default there is a event on the msdyn_timeunit field on Price List handled by the Web Resource 'msdyn_/ContractBilling/Scripts/PriceListView.js' that sets a predefined value for time unit

    var queryOptions = TransactionType.filterForTypeCodeAndClass(TransactionType.typeCodeValues.SalesContract, TransactionType.classValues.Time);
    dataContext.read(queryOptions, function (transaction) {
    	if (transaction && transaction[0]) {
    		unitGroupId = transaction[0].unitGroup;
    		defaultUnit = transaction[0].defaultUnit;
    		defaultUnitName = transaction[0].defaultUnitName;
    	}
    }

    Here I am stuck. Not sure, where defaultUnit and defaultUnitName are specified.

    
    

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 Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans