Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Finance forum / Functionality is worki...
Finance forum

Functionality is working fine in DEV but build is deployed to Test environment, it is not working.

(0) ShareShare
ReportReport
Posted on by 2,472

We developed a functionality which is working fine in DEV but when it is merged to the Main branch and build is deployed to Tier2 environment, it is not at all working. The code is perfectly showing in VSTS in the Main branch. Tried restarting the server and IISRESET as well but no luck.

Please help!

Thanks in Advance,

Raziq Ali

  • Verified answer
    Mohammad Raziq Ali Profile Picture
    2,472 on at
    RE: Functionality is working fine in DEV but build is deployed to Test environment, it is not working.

    I found the root cause of the issue as Descriptor file has been missing from model file in VSTS. I added now. thanks for your help!

  • Mohammad Raziq Ali Profile Picture
    2,472 on at
    RE: Functionality is working fine in DEV but build is deployed to Test environment, it is not working.

    Yeah Nikolaos, I am doing that as you suggested.

  • Suggested answer
    nmaenpaa Profile Picture
    101,156 Moderator on at
    RE: Functionality is working fine in DEV but build is deployed to Test environment, it is not working.

    ...and the deployable package from that build is deployed to test?

    If that's the case, the next step is to copy your test database to dev and debug it. Please let us know the results.

  • Mohammad Raziq Ali Profile Picture
    2,472 on at
    RE: Functionality is working fine in DEV but build is deployed to Test environment, it is not working.

    Yes, it is there in Build. I use Build machine and build from Azure DEVOps.

  • Suggested answer
    nmaenpaa Profile Picture
    101,156 Moderator on at
    RE: Functionality is working fine in DEV but build is deployed to Test environment, it is not working.

    Did you verify that the changeset was in the build, and that the deployable package from that build was applied to Tier2.

    What is your build process, do you use a build machine and build from Azure DevOps? If you create deployable packages manually in dev machine you can never be sure that you build the code from the source control. Instead you might build local non-version controlled code.

  • Mohammad Raziq Ali Profile Picture
    2,472 on at
    RE: Functionality is working fine in DEV but build is deployed to Test environment, it is not working.

    Hello Sohaib,

    It is only single package only. Anything which I am missing?

    Thanks,

    Raziq Ali

  • Sohaib Cheema Profile Picture
    46,614 User Group Leader on at
    RE: Functionality is working fine in DEV but build is deployed to Test environment, it is not working.

    keep the life simple.

    build everything and produce a single deployable package and move that to your any other(non-dev) boxes.

    in case if you got more than one packages, merge those on LCS. If you will try bits and pieces, things can go wrong.

  • Mohammad Raziq Ali Profile Picture
    2,472 on at
    RE: Functionality is working fine in DEV but build is deployed to Test environment, it is not working.

    FINDIM1 is just an example.

  • Suggested answer
    nmaenpaa Profile Picture
    101,156 Moderator on at
    RE: Functionality is working fine in DEV but build is deployed to Test environment, it is not working.

    Please click "Use rich text formatting" -> "</>" when sharing your code. It makes it easier to read. This time I will do it for you.

    The code looks ok, and even if you didn't have a dimension called "FINDIM1" in your test environment, I would expect that you should get the infolog.

    I suggest you copy your test database to your development environment and debug it.

    Before that, please make sure that it's deployed in your Tier2 like I instructed.

  • Mohammad Raziq Ali Profile Picture
    2,472 on at
    RE: Functionality is working fine in DEV but build is deployed to Test environment, it is not working.

    Hello Nikolaos,

    This is my code.

    Class PurchLineMandateStoreFDEventHandler
    {
       /// <summary>
       ///
       /// </summary>
       /// <param name="args"></param>
       [PostHandlerFor(tableStr(PurchLine), tableMethodStr(PurchLine, validateWrite))]
       public static void PurchLine_Post_validateWrite(XppPrePostArgs args)
       {        
           PurchLine                               purchLine = args.getThis();
           boolean                                 ret = args.getReturnValue();
           DimensionAttribute                      dimAttr;
           DimensionAttributeValue                 dimAttrValue;
           DimensionAttributeValueSetItem          dimAttrValueSetItem;
           dimAttr                                 =   DimensionAttribute::findByName('FINDIM1');
           select firstonly RecId, DisplayValue from dimAttrValueSetItem
              where   dimAttrValueSetItem.DimensionAttributeValueSet == purchLine.defaultDimension
               join    dimAttrValue
              where   dimAttrValue.RecId == dimAttrValueSetItem.DimensionAttributeValue
               &&      dimAttrValue.DimensionAttribute == dimAttr.RecId
               &&      dimAttrValue.IsDeleted == false;
           if (!dimAttrValueSetItem.DisplayValue)
           {
               ret     = checkFailed(strFmt("LabelXXX",purchLine.LineNumber));
           }
           args.setReturnValue(ret);
       }
    }


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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,245 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,925 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans