web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Function ProjBudgetTransactionLine_Virtual::construct has been incorrectly called.

(0) ShareShare
ReportReport
Posted on by

got the following error while trying to create a P.O  

" Function ProjBudgetTransactionLine_Virtual::construct has been incorrectly called." 

7127.POBudget.PNG

* the function in question 

public static ProjBudgetTransactionLine construct(
ProjTransType _transType,
TransDate _transDate,
ProjTransIdBase _transId,
ProjId _projId,
ProjCategoryId _categoryId,
Qty _quantity,
CurrencyCode _costAmountCurrencyCode,
CostAmount _costAmount,
CurrencyCode _salesAmountCurrencyCode,
SalesAmount _salesAmount,
RefRecId _sourceDocumentLine,
ProjActivityNumber _projActivityNumber = '',
ProjLinePropertyId _projLinePropertyId = ''
)
{
ProjBudgetTransactionLine_Virtual projBudgetTransactionLine_Virtual = new ProjBudgetTransactionLine_Virtual();

if (!_transDate ||
!_projId ||
!_categoryId ||
(_transType != ProjTransType::Revenue && !_costAmountCurrencyCode) ||
!_salesAmountCurrencyCode ||
!_sourceDocumentLine)
{
throw error(strFmt("@SYS22828", funcName()));
}

projBudgetTransactionLine_Virtual.parmTransType(_transType);
projBudgetTransactionLine_Virtual.parmTransDate(_transDate);
projBudgetTransactionLine_Virtual.parmTransId(_transId);
projBudgetTransactionLine_Virtual.parmProjId(_projId);
projBudgetTransactionLine_Virtual.parmCategoryId(_categoryId);
projBudgetTransactionLine_Virtual.parmCostAmountCurrencyCode(_costAmountCurrencyCode);
projBudgetTransactionLine_Virtual.parmSalesAmountCurrencyCode(_salesAmountCurrencyCode);

projBudgetTransactionLine_Virtual.parmQty(_quantity);
projBudgetTransactionLine_Virtual.parmCostAmount(_costAmount);
projBudgetTransactionLine_Virtual.parmSalesAmount(_salesAmount);
projBudgetTransactionLine_Virtual.parmTransIdRef('');
projBudgetTransactionLine_Virtual.parmProjActivityNumber(_projActivityNumber);
projBudgetTransactionLine_Virtual.parmSourceDocumentLine(_sourceDocumentLine);
projBudgetTransactionLine_Virtual.parmLinePropertyId(_projLinePropertyId);
return projBudgetTransactionLine_Virtual;
}

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    239,082 Most Valuable Professional on at

    If you can, use the debugger to find out which parameter (or parameters) has a wrong value. Then you'll look at the code calling construct() and figure out why it's wrong.

  • Community Member Profile Picture
    on at

    thank you  for the reply martin ... is there any way to test all parameter without debugging on live environment ?

  • Martin Dráb Profile Picture
    239,082 Most Valuable Professional on at

    You can analyze the code, identify all the places where values of all parameters may come from and then review the data in production.

    If you can't reproduce the problem in any non-production environment, considering copying data from production and trying it again. It may be easier than analyzing code.

  • thegallery2020 Profile Picture
    95 on at

    i am facing the same error please help me how to rectify this

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

    Hi thegallery2020,

    since you found this old discussion, I assume you already tried the suggestions that were given above.

    Please share with us what you learned when following the suggestions. Thanks!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Andrew Jones a1x Profile Picture

Andrew Jones a1x 2

#3
Basit Profile Picture

Basit 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans