Error executing code: xRecord object does not have method 'setActiveSiteAndItemDimensions'.

when I am making credit note and receiving production order below error coming.

Error executing code: xRecord object does not have method ‘setActiveSiteAndItemDimensions’.

(S)\Classes\xRecord\setActiveSiteAndItemDimensions
(S)\Data Dictionary\Tables\InventItemPrice\Methods\setupInventDimParmAndCriteria - line 15
(S)\Data Dictionary\Tables\InventItemPrice\Methods\findCurrent - line 21
(S)\Data Dictionary\Tables\InventTable\Methods\inventCostPriceMap - line 40
(S)\Data Dictionary\Tables\InventTable\Methods\costPcsPrice - line 10
(S)\Classes\SalesLineType\initFromInventTable - line 57
(S)\Classes\SalesLineType\initFromCustInvoiceTrans - line 12
(S)\Data Dictionary\Tables\SalesLine\Methods\initFromCustInvoiceTrans - line 14
(S)\Classes\SalesCopying\copy - line 67
(S)\Classes\SalesCopying_CreditNote\copy - line 5
(C)\Forms\SalesCopying\Methods\canClose
(C)\Classes\FormRun\closeOk
(C)\Forms\SalesCopying\Methods\closeOk
(C)\Classes\FormRun\task
(C)\Classes\SysSetupFormRun\task - line 20

I compile all the classes ,forms and tables methods except xrecords the result of re-compile gives me no error.

Have you tried debugging? if so, what did you found while debugging?

I again re-compile the code and restart the AOS.it works fine now.