Tested on:
Dynamics 365 version 9.0
Project Service Automation solution version 2.1.0.30
A Project Contract can have Time and Material or Fixed Price based lines and it's standard functionality that a single Project Contract can be associated with multiple Projects. There is an unfortunate bug in Dynamics 365 Project Service Automation that prevents a user from adding multiple project-based lines when a contract has both a Time and Material and a Fixed Price line added to it and when both lines are associated with the same project.
Example: Adding a third line associated with Project 102 creates a Business Process Error as the contract has both Time and Material and Fixed Price lines associated with Project 101.
An error does not occur if a contract only has Time and Material or Fixed Price lines with all lines associated with separate projects or if a mixture of Time and Material and Fixed Price lines are all associated with different projects.
When discussing the issue with Microsoft, the behavior was flagged as a defect in code. Personally I would have been happy with a fix in a future release of the PSA solution but Microsoft went above and beyond and provided a nice and easy temporary fix to the issue. My big thanks to Victoria Vazharova at Microsoft for the great help!
The fix
1. Edit field msdyn_IncludeMaterial on the Order Line entity. Set the Default Value to No.
2. Open the Project Information form on the Order Line entity. Add the Include Material field on the form and hide it if you don't want it displayed on the form.
3. Open the Project Contract Lines view on the Order Line entity. Add the Include Material column to the view. Save and publish customizations.
4. Add contract lines on a contract and notice that the Business Process Error doesn't occur anymore. Remember that you can only associate Time, Expense and Fee once per contract line per project. In other words if you have a Time and Material contract line with Time = Yes, Expense = Yes, Fee = Yes for Project X, you can't add a Fixed Price line with Time, Expense and Fee and associate that with Project X anymore as you already have Time, Expense and Fee selected as Yes on the T&M line.
I hope this fix enables you to take full use of Project Contract. If you run a different version of the PSA solution or version 8.2 of Dynamics 365, I still suggest you try this fix in your sandbox environment. Again a very big thanks to Microsoft.
Disclaimer:
All my blog posts reflect my personal opinions and findings unless otherwise stated.

Like
Report
*This post is locked for comments