Hyphens in Dynamics GP Fixed Assets

Today’s #TipTuesday is about the Dynamics GP Fixed Assets module. I am going to discuss the restriction around the use of hyphens (dashes) in Fixed Asset IDs. Prior to GP 2013, there was no issue with hyphens and many customers who utilized Fixed Assets had created Asset IDs with them as separators. Of the numerous clients I have been to over the years, every single one of them used hyphens as it was easy to read, both on reports and in the screens (where things like underscores often get partially hidden by the UI). There was a consistency in viewing the Asset ID + suffix on reports too, since the “Full” Asset ID with the suffix displays with a hyphen. Using some other character as a separator combined with the use of a hyphen between ID and suffix just plain looks weird (to me).

Fast forward to GP 2013, or it might have been GP 2013 R2 (I can’t recall), there was a change to the code base that now prevented hyphens, and only hyphens, from being used in Asset IDs. Mark Polino, on this thread, suggested a possible reason which makes a lot of sense: auto-numbering functionality was added to the GP Fixed Assets module around then.

Anyway, that’s not the point of this post, although if you would like to vote on rescinding the restriction on hyphens, feel free to vote on a suggestion I made! That suggestion can be found here.

This post describes a couple of the issues and some workarounds that help you navigate your module better if you had Dynamics GP (and used hyphens) prior to GP 2013. There are two specific things that happened when the code change was made, and there are some ways around both of them. Keep in mind that it is always possible that Microsoft may “fix” these to close the loophole so take these techniques with a disclaimer of “it works today but might not always work”!

Situation #1 – Can’t create AssetIDs with a hyphen

Starting with GP 2013, if you tried to create a Fixed Asset manually in Dynamics GP, you were unable to. You will get this error if you try: “The asset ID cannot contain a hyphen. Select a different asset ID.”

Error creating Fixed Asset with a dash/hypen

Workaround – create your Fixed Asset cards via eConnect. When creating Fixed Asset General cards via import through eConnect, there is no such restriction, so using hyphens works. Yes, this requires setting up an import but if you create assets regularly, it’s so much faster to bulk import assets it’s worth it. I built a SmartConnect import for a client that now imports all of their assets so they can resume using hyphens again.

Not-quite-a-workaround – you can use the PSTL (Professional Services Tools Library) module’s Fixed Asset Modifier to renumber your asset after creating it. That’s kind of sucky I admit, but, technically it’s an option. The module does it one at a time but there are SQL script options to mass renumber fixed assets that could work too. The link to the thread above to the community post Mark Polino commented on has some input from others with scripts you can look at. There are not many things where I suggest SQL scripts are a “good” option but there are relatively few FA tables to update and the scripts you can find in that thread touch the same tables that the PSTL tool itself touches.

Here’s an asset I created in Dynamics GP with an underscore instead of a hyphen, and then used PSTL to renumber it.

PSTL Asset Modifier

… and the resulting confirmation message that the business logic didn’t prevent this change from occurring.

PSTL confirmation message

Situation #2 – Can’t look up AssetIDs with hyphens in the General window

To be clear, what I’m describing here is what happens if you type part of an AssetID, including the hyphen, and then click on the lookup window in Dynamics GP. If you don’t enter a hyphen, the lookup works just fine. If you include the hyphen, it won’t. Here’s what happens: it looks like it will work until you select the asset from the lookup window. The error message is the same as above: “The asset ID cannot contain a hyphen. Select a different asset ID”.

Lookup error

Workaround #1 – Use the FIND button in the lookup. You can use the hyphen in the Find window within the lookup. It’s an extra couple of steps but it works. What I show below is looking up something with a hyphen, click Find, it returns results and I select from there.

Find button in lookup

Workaround #2 – Use the Book window or anything other than the General window (that I’ve tested at least!). You’ve read that correctly: there is an inconsistency in how the code was implemented and you can look up items with hyphens in the Book window and from there, use the GoTo shortcut on the window to jump back to General. Again, this is a couple of extra clicks but it works.

Lookup in Book window

Not-quite-a-workaround – change your habits and use a Smartlist to select an Asset and using the GoTo functionality, jump into the General window instead of opening up General first and then trying to find an Asset with a hyphen. This would allow you to search/sort/find assets relatively easily but once again, it’s a big change in habit and not necessarily realistic for many users.

Bottom Line

If you have this issue, there are a few ideas to get around the limitation. The other approach would be to look at the scripts in that thread, and test renumbering all of your Asset IDs to replace the dash with something else, so that you have no workarounds to worry about! I like the dashes but this would be the most likely solution in the long run, especially if the code base changes again to close these loopholes.

2 thoughts on “Hyphens in Dynamics GP Fixed Assets

  1. Reply
    Robert E Klaproth - September 11, 2019

    Hi Jen, I’m going to respectfully disagree with this post. While these are some great workarounds, it’s never a good idea to bypass UI restrictions and then leave the user stuck having to live in an environment of workarounds.

    It’s much easier to rename all the assets with a different character, you can use something like an _ or a dot instead..

    So, instead of having ASSET-1234 it would be ASSET.1234 or ASSET_1234. All of the lookup windows will work and no workarounds are needed.

    Microsoft Support gave me a handy script to replace all the dashes in your assets with another character, so when you upgrade you won’t be stuck not being able to lookup your assets in the inquiry window.

    1. Reply
      Jen Kuntz - September 12, 2019

      Hi Rob,
      I guess we’ll have to agree to disagree then. Nothing I’ve stated is bypassing the UI or current business logic as built by Microsoft – eConnect is supported, looking up assets in another window is supported, etc. Not a single thing I’ve suggested will leave a user stuck. Users can use any of the lookups they want *today* if they don’t type in a dash, even if their assets have dashes in them OR use one of the other windows that most users wouldn’t think to try. The code is pretty inconsistently applied here, hence some windows work with dashes and some don’t.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to top