web
You’re offline. This is a read only version of the page.
close
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,486

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

I have the same question (0)
  • Jie G Profile Picture
    on at

    Hello Raziq,

    The information you provided is too generic.

    As you say it is not at all working, what's your developed functionality and is there any error message or something else to help us understand your issue?

  • Mohammad Raziq Ali Profile Picture
    2,486 on at

    Hello Ada,

    We have written validation for Purchase order line that if one of the Financial dimension is missing, it has to prompt warning message for that specific line. It is working fine in DEV but not in TEST.

    Thanks,

    Raziq

  • Suggested answer
    nmaenpaa Profile Picture
    101,162 Moderator on at

    Well, first of all you can check that the changeset was included in the build that produced the deployable package that you deployed to test. You can see this in the Build pipelines page, where you see your build history (assuming you are using a build VM).

    Then you can check from your Tier2 environment history that the package was surely deployed.

    Finally, it's possible that the code is there but doesn't work expectedly in your Tier2 for some reason (for example different data). If this is the case, maybe you could share your code and we can check if it raises any suspicion.

  • Mohammad Raziq Ali Profile Picture
    2,486 on at

    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);
       }
    }


  • Suggested answer
    nmaenpaa Profile Picture
    101,162 Moderator on at

    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,486 on at

    FINDIM1 is just an example.

  • Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    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,486 on at

    Hello Sohaib,

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

    Thanks,

    Raziq Ali

  • Suggested answer
    nmaenpaa Profile Picture
    101,162 Moderator on at

    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,486 on at

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

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 > Finance

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans