# Missing Method Exeception Error

**URL:** <https://www.dynamicsuser.net/t/missing-method-exeception-error/62851>\
**Category:** Developer Forum\
**Created:** [March 1, 2017, 8:08pm UTC](https://www.dynamicsuser.net/t/missing-method-exeception-error/62851 "2017-03-01T20:08:11Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![lohit192](https://avatars.discourse-cdn.com/v4/letter/l/3bc359/32.png) [@lohit192](https://www.dynamicsuser.net/u/lohit192)\
**Post date:** [March 1, 2017, 8:08pm UTC](https://www.dynamicsuser.net/t/missing-method-exeception-error/62851/1 "2017-03-01T20:08:11Z")

</div>

Everytime I try to add an item in my sales line, the following error pops up and it will not let me perform any actions on my sales order form. I know it’s a huge error, but that’s what makes it so surprising, something I have not seen before.

Error:

System.MissingMethodException: Method not found: ‘System.Collections.Generic.IList`1\<Microsoft.Dynamics.Commerce.Runtime.DataModel.SalesLine\> Microsoft.Dynamics.Commerce.Runtime.DataModel.SalesTransaction.get\_SalesLines()’.  
at Dynamics.Ax.Application.RetailSalesOrderCalculator.Setpriceoncurrentline()  
at Dynamics.Ax.Application.SalesPurchLine.Setpricediscpriceunit(PriceDisc\_Price \_priceDisc, PriceDiscPolicyCheckPolicy \_checkPolicy, RetailOrderCalculator \_retailCalculator, Boolean ) in SalesPurchLine.setPriceDiscPriceUnit.xpp:line 30  
at Dynamics.Ax.Application.SalesPurchLine.Setpricediscpriceunit(PriceDisc\_Price \_priceDisc, PriceDiscPolicyCheckPolicy \_checkPolicy, RetailOrderCalculator \_retailCalculator)  
at Dynamics.Ax.Application.SalesLine.Setpricediscpriceunit(PriceDisc\_Price \_priceDisc, PriceDiscPolicyCheckPolicy \_checkPolicy, RetailSalesOrderCalculator \_retailCalculator, Boolean ) in SalesLine.setPriceDiscPriceUnit.xpp:line 18  
at Dynamics.Ax.Application.SalesLine.Setpricediscpriceunit(PriceDisc\_Price \_priceDisc, PriceDiscPolicyCheckPolicy \_checkPolicy, RetailSalesOrderCalculator \_retailCalculator)  
at SalesLine::setPriceDiscPriceUnit(Object , Object[] )  
at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeInstanceCall(Object instance, String MethodName, Object[] parameters)  
at Dynamics.Ax.Application.SalesPurchLine.Setpricediscpriceunitmarkup(PriceDisc\_Price \_priceDisc, PriceDiscPolicyCheckPolicy \_checkPolicy, RetailOrderCalculator \_retailCalculator, Boolean , Boolean ) in SalesPurchLine.setPriceDiscPriceUnitMarkup.xpp:line 28  
at Dynamics.Ax.Application.SalesPurchLine.Setpricediscpriceunitmarkup(PriceDisc\_Price \_priceDisc, PriceDiscPolicyCheckPolicy \_checkPolicy, RetailOrderCalculator \_retailCalculator)  
at Dynamics.Ax.Application.SalesLine.Initfrompricedisc(PriceDisc\_Price \_priceDisc, PriceDiscPolicyCheckPolicy \_checkPolicy, Boolean \_initDateFields, RetailSalesOrderCalculator \_retailCalculator, Boolean , Boolean , Boolean ) in SalesLine.initFromPriceDisc.xpp:line 17  
at Dynamics.Ax.Application.SalesLine.Initfrompricedisc(PriceDisc\_Price \_priceDisc, PriceDiscPolicyCheckPolicy \_checkPolicy, Boolean \_initDateFields, RetailSalesOrderCalculator \_retailCalculator)  
at SalesLine::initFromPriceDisc(Object , Object[] )  
at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeInstanceCall(Object instance, String MethodName, Object[] parameters)  
at Dynamics.Ax.Application.SalesPurchLine.Setpriceagreement(InventDim \_inventDim, Boolean \_doCallPriceDate, PriceDiscPolicyCheckPolicy \_checkPolicy, Boolean \_initDateFields, RetailSalesPurchLineMap \_retailSalesPurchLineMap, Boolean , Boolean , Boolean , Boolean ) in SalesPurchLine.setPriceAgreement.xpp:line 31  
at Dynamics.Ax.Application.SalesPurchLine.Setpriceagreement(InventDim \_inventDim, Boolean \_doCallPriceDate, PriceDiscPolicyCheckPolicy \_checkPolicy, Boolean \_initDateFields, RetailSalesPurchLineMap \_retailSalesPurchLineMap)  
at Dynamics.Ax.Application.SalesLine.Setpriceagreement(InventDim \_inventDim, PriceDiscPolicyCheckPolicy \_checkPolicy, Boolean \_initDateFields, RetailSalesLine \_retailSalesLine, Boolean , Boolean , Boolean ) in SalesLine.setPriceAgreement.xpp:line 6  
at Dynamics.Ax.Application.SalesLine.Setpriceagreement(InventDim \_inventDim, PriceDiscPolicyCheckPolicy \_checkPolicy, Boolean \_initDateFields, RetailSalesLine \_retailSalesLine)  
at Dynamics.Ax.Application.SalesLine.Setpricedisc(InventDim \_inventDim, Boolean \_initDateFields, RetailSalesLine \_retailSalesLine, Boolean , Boolean ) in SalesLine.setPriceDisc.xpp:line 34  
at Dynamics.Ax.Application.SalesLine.@Setpricedisc(InventDim \_inventDim, Boolean \_initDateFields, Boolean )  
at Dynamics.Ax.Application.SalesLine.Setpricedisc(InventDim \_inventDim)  
at Dynamics.Ax.Application.SalesLine.modifySalesQtyIL(Object[] \_inputContract) in SalesLine.modifySalesQtyIL.xpp:line 48  
at SalesLine::modifySalesQtyIL(Object[] )  
at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeStaticCall(Type type, String MethodName, Object[] parameters)  
at Dynamics.Ax.Application.SysDictTable.invokeStaticMethod(Object[] \_params) in SysDictTable.invokeStaticMethod.xpp:line 32  
at SysDictTable::invokeStaticMethod(Object[] )  
at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeStaticCall(Type type, String MethodName, Object[] parameters)  
at Microsoft.Dynamics.Ax.Xpp.PredefinedFunctions.runAsInvoke(String className, String staticMethodName, Object[] parms, Object[]& exportInfolog)

---

<div class="post-metadata">

**Author:** ![kranthi](https://avatars.discourse-cdn.com/v4/letter/k/e480ec/32.png) [@kranthi](https://www.dynamicsuser.net/u/kranthi)\
**Post date:** [March 2, 2017, 2:15am UTC](https://www.dynamicsuser.net/t/missing-method-exeception-error/62851/2 "2017-03-02T02:15:26Z")

</div>

Have you done the CIL? If yes,

Turn off the CIL (in options → development) and see if you get any error. If you are not getting any error then it could be problem with the IL code generated.

---

<div class="post-metadata">

**Author:** ![venkata2973](https://sea1.discourse-cdn.com/flex023/user_avatar/www.dynamicsuser.net/venkata2973/32/9430_2.png) [@venkata2973](https://www.dynamicsuser.net/u/venkata2973)\
**Post date:** [March 2, 2017, 2:35am UTC](https://www.dynamicsuser.net/t/missing-method-exeception-error/62851/3 "2017-03-02T02:35:11Z")

</div>

Was there a Model update or any recent code changes to those forms/objects ?

Then well it could also be a caching issue, The new changes couldn’t have been updated in the cache.

Resolution :

Find the object by its name under “Usage data form” that you think has changed recently.

Select and delete those records that are associated to that Form & functionality and Re-test. You should be good.

![pastedimage1488421652422v1.png](https://us1.discourse-cdn.com/flex023/uploads/dugusers/original/2X/4/4f5ba0c2d67417d12a37f965c92c79e86a7f4eb3.png)

---

<div class="post-metadata">

**Author:** ![lohit192](https://avatars.discourse-cdn.com/v4/letter/l/3bc359/32.png) [@lohit192](https://www.dynamicsuser.net/u/lohit192)\
**Post date:** [March 2, 2017, 5:37pm UTC](https://www.dynamicsuser.net/t/missing-method-exeception-error/62851/4 "2017-03-02T17:37:12Z")

</div>

Hi, thank you for your suggestions.  
[mention:d16d1631a7404018a8e6312528e48961:e9ed411860ed4f2ba0265705b8793d05]  
When i turn off the CIL and try to add an item in the salesline, the AX debugger opens and then nothing happens. The empty debugger page just stays there. Does that mean anything?

[mention:16365c73cee442d1bc74db5cf6e4bd52:e9ed411860ed4f2ba0265705b8793d05]  
So I tried to delete all user cache from my instance and re-tested it to find the same error popping up again. So to add a little context to this, there are a few mods which a third party vendor does for us, and they have been working on CU12 for the past of couple of days and releasing that new CU in all the dev instances. When I reached out to them about this issue, they explain that whatever they are doing shouldn’t affect my instance at this point of time. But I am somehow not convinced about this though.  
Is there anything else that I can try to get past this, if not, what other questions can I ask that vendor to get more info on this error?

---

<div class="post-metadata">

**Author:** ![venkata2973](https://sea1.discourse-cdn.com/flex023/user_avatar/www.dynamicsuser.net/venkata2973/32/9430_2.png) [@venkata2973](https://www.dynamicsuser.net/u/venkata2973)\
**Post date:** [March 2, 2017, 6:30pm UTC](https://www.dynamicsuser.net/t/missing-method-exeception-error/62851/5 "2017-03-02T18:30:15Z")

</div>

Compare the differences in hotfixes, there shouldn’t be any differences in Binaries nor Application hotfixes between the environments. Request the KB numbers and do the analysis first to make sure there isn’t any application fix missing.

If you can reproduce the same error on another DEV machine then that itself confirm there is something missing.

---

<div class="post-metadata">

**Author:** ![venkata2973](https://sea1.discourse-cdn.com/flex023/user_avatar/www.dynamicsuser.net/venkata2973/32/9430_2.png) [@venkata2973](https://www.dynamicsuser.net/u/venkata2973)\
**Post date:** [March 3, 2017, 4:03am UTC](https://www.dynamicsuser.net/t/missing-method-exeception-error/62851/6 "2017-03-03T04:03:04Z")

</div>

Lets Isolate the issue first, Try to reproduce the error in another DEV instance. If you cannot reproduce that then we will comeback & continue to triage this issue in your environment that has issues.

---

<div class="post-metadata">

**Author:** ![lohit192](https://avatars.discourse-cdn.com/v4/letter/l/3bc359/32.png) [@lohit192](https://www.dynamicsuser.net/u/lohit192)\
**Post date:** [March 3, 2017, 2:26pm UTC](https://www.dynamicsuser.net/t/missing-method-exeception-error/62851/7 "2017-03-03T14:26:27Z")

</div>

Hi, Thanks for looking into this.

I have tried to reproduce this error in our test instance, but to no avail. This doesn’t seem to be a error in response to the mods and customizations I have been making. I even exported the xpo’s of some projects (mods) that I made, deleted them in my instance and yet this error persists.

---

<div class="post-metadata">

**Author:** ![kunal\_patel](https://avatars.discourse-cdn.com/v4/letter/k/d2c977/32.png) [@kunal\_patel](https://www.dynamicsuser.net/u/kunal_patel)\
**Post date:** [March 3, 2017, 3:30pm UTC](https://www.dynamicsuser.net/t/missing-method-exeception-error/62851/8 "2017-03-03T15:30:26Z")

</div>

Hello Lohit,

can you give more details what exactly your vendor is changing and what do you mean by " your dev instance and vendor is working on other dev instance?"

did you try to do full CIL?

---

<div class="post-metadata">

**Author:** ![lohit192](https://avatars.discourse-cdn.com/v4/letter/l/3bc359/32.png) [@lohit192](https://www.dynamicsuser.net/u/lohit192)\
**Post date:** [March 3, 2017, 3:36pm UTC](https://www.dynamicsuser.net/t/missing-method-exeception-error/62851/9 "2017-03-03T15:36:35Z")

</div>

Hi Kunal, There are several modifications which the vendor does for us, which tend to use the same objects (tables/forms/classes) that I use for my own development tasks. It turns out that my instance incompletely picked up some objects and code change which the vendor has been working on, and hence throwing errors.

I however did get past the problem. After debugging, I commented out all the code which looks for objects not present in my instance and it works fine now.

---

<div class="post-metadata">

**Author:** ![lohit192](https://avatars.discourse-cdn.com/v4/letter/l/3bc359/32.png) [@lohit192](https://www.dynamicsuser.net/u/lohit192)\
**Post date:** [March 3, 2017, 3:38pm UTC](https://www.dynamicsuser.net/t/missing-method-exeception-error/62851/10 "2017-03-03T15:38:04Z")

</div>

I was finally able to debug the entire code used by the Sales Table form and it turns out there are a lot of objects and code (not completely) which my instance picked up from the vendor(don’t know how and why). So although it was showing the vague missing method exception, the code was trying to use objects which are not there and some method calls which are not present. I commented out all the code which was problematic and it works fine now. So when the vendor does a full CU, hopefully my instance will be in sync with the newest changes. Thank you for your help and I’ll keep you posted on any new things that come up past the CU 12.

---

<div class="post-metadata">

**Author:** ![venkata2973](https://sea1.discourse-cdn.com/flex023/user_avatar/www.dynamicsuser.net/venkata2973/32/9430_2.png) [@venkata2973](https://www.dynamicsuser.net/u/venkata2973)\
**Post date:** [March 6, 2017, 5:08am UTC](https://www.dynamicsuser.net/t/missing-method-exeception-error/62851/11 "2017-03-06T05:08:28Z")

</div>

Good to hear that you were able to crack the issue.  
But…  
If that’s just a problem with your DEV machine why don’t you restore database backups from another machine which you think are healthy and proceed. Rather waiting for your vendor to sync next time.

Take a backup of the transaction database and Model database of your current system before proceeding on the restores.
