Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

The difference between "Build model" and Rebuild Project

Posted on by Microsoft Employee

I imported a D365FO project going by model:"MyModel" in the application explorer and add search results to new project.

When you make changes to my code in the project like adding new forms or classes am I supposed to rebuild the project from solution explorer(A)? or go D365 -> Build Model from the Menu(B)?

The reason I am asking is when updating the data entity ( override functions ) and do (A) the change don't get deploy to the AOS where as (B) will deploy the change but it takes 2-3 minutes which I can't stand to do it all the time(painfully slow). I like to know what is the difference between (A) and (B) and if you can point out the document about it that would be helpful.

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: The difference between "Build model" and Rebuild Project

    No I am not talking about UI but chaning class method name or adding new class method.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: The difference between "Build model" and Rebuild Project

    When I added the following code to data entity and "Build/Rebuild Project" and trying to call this path through url I wasn't able to use this endpoint /data/STFWebSchedRsrcCollection/Microsoft.Dynamics.DataEntities.AvailableSchedRsrcList (500 errors) but after Build Model it started working. Just to mention the default endpoint (/data/STFWebSchedRsrcCollection/) is working fine. I didn't have to synchronize the database. But after I get this endpoint working I can change inside of AvailableVehicles function and I get this changes applied to AOS right away when I just "Build Project".

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: The difference between "Build model" and Rebuild Project

    Based on my testing not so clear the difference between "Build Model" and "Build/Rebuild Solution". Sometime it will pick up the change sometime it doesn't when just "Build/Rebuild Solution". It almost like when you change the interface it requires Build Model but just changing the code inside function "Build Solution" is fine.  

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,280 Super User 2024 Season 2 on at
    RE: The difference between "Build model" and Rebuild Project

    The synchronization job takes care of also synchronizing available data entities with the latest versions. So for data entities, just a simple build is not sufficient. It is the first step. Second: DB sync.

    A rebuild means that all compiled elements will be deleted before building new ones. A build will just create new elements and new versions of existing elements. This means that a build will not clean up obsolete compiled files whereas the rebuild will do this.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: The difference between "Build model" and Rebuild Project

    I just added the following code to the existing Data entity but didn't work when building project and haven't done the synchronization.

    However when I build model then it started working(can add a breakpoint etc...)

    [SysODataActionAttribute("AvailableSchedRsrcList", false),SysODataCollectionAttribute("return", Types::Record, "STFWebSchedRsrcEntity")]
    public static List AvailableVehicles()
    {
    STFWebSchedRsrcEntity schedRsrc;
    List schedRsrcList;
    
    schedRsrcList = new List(Types::Record);
    while
    select schedRsrc
    {
    schedRsrcList.addEnd(schedRsrc);
    }
    
    return schedRsrcList;
    }


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