Acumatica Business Central Sage Intacct STACK Takeoff & Estimate Velixo Classic Velixo CLI
Acumatica Business Central Sage Intacct STACK Takeoff & Estimate Velixo Classic Velixo CLI

WRITEBACKPROJECTCOSTPROJECTION

Overview

If you want to write a new cost projection for your project to your ERP, you can use the WRITEBACKPROJECTCOSTPROJECTION function. The imported cost projection will have the status On Hold and should be processed further manually in Acumatica (Remove Hold → Release).

You need to write a separate WRITEBACKPROJECTCOSTPROJECTION formula for each cost budget line in your project cost projection.

By default, the function writes each line in Manual mode: you supply the projected costs and quantities yourself, and Acumatica does not derive any of them from the others. Set the CalculationMode argument to Auto to supply a single projected value and let Acumatica calculate the rest of the line, the same way it does when you edit a line in Auto mode on the Cost Projection (PM305000) form.

The two modes accept different arguments. In Manual mode, you supply the projected values you want to write. In Auto mode, you supply exactly one. See Calculation modes below.

The function does not accept cost projection data that cannot be released later. Even though Acumatica allows you to add lines with incomplete information, these lines cannot be released until you specify their task, account group, and other details defined by the cost projection class.

When you select the scope of the Perform Writeback action on the ribbon, all writeback functions in this scope (Current Sheet or Selected Cells) will be grouped by the project revision and written to the ERP.

Syntax

=WRITEBACKPROJECTCOSTPROJECTION(
    ConnectionName,
    Project,
    Revision,
    RevisionDate,
    CostProjectionDescription,
    CostProjectionClass,
    Task,
    AccountGroup,
    CostCode,
    InventoryId,
    LineDescription,
    ProjectedCostToComplete,
    ProjectedQuantityToComplete,
    ProjectedCostAtCompletion,
    ProjectedQuantityAtCompletion,
    ProjectedVarianceCost,
    ProjectedVarianceQuantity,
    ProjectedCompletedPercent,
    CalculationMode
)

Arguments

The arguments of the WRITEBACKPROJECTCOSTPROJECTION function can be divided into two groups:

  1. The settings of a revision of a cost projection for a particular project and its details

  2. The arguments of the project's cost budget line.

https://s3.ca-central-1.amazonaws.com/cdn.velixo.com/helpdesk/iiE5mC7fGazh62MsBBTNVgjlAXAeRIF-Eg.png

The arguments of the project revision should be the same for all cost budget lines you will add to the cost projection.

Argument

Required/Optional

Description

ConnectionName

Required if the workbook has more than one Acumatica connection

The name of the connection, as specified in the Connection Manager.

If the workbook has a single Acumatica connection, you can omit this argument and that connection is used.

This function does not support the multiple connection functionality.

Project

Required

The project for which the revision is projecting costs.

Revision

Required

The revision identifier of the cost projection.

If creating a new revision, enter an identifier that is unique within the project. The identifier cannot contain a hyphen (-).

RevisionDate

Required

The date when the cost projection revision was created.

Enter an Excel date or a text date, for example 2026-11-30 or 11/30/2026.

CostProjectionDescription

Optional

The description of the cost projection.

CostProjectionClass

Required

The cost projection class of the cost projection revision. The class is defined on the Cost Projection Classes (PM203500) form and defines the detail level of the cost projection.

The cost projection revision must include the same level of detail as the cost budget of the project for which the revision is created.

The following arguments define the cost budget line.

Argument

Required/Optional

Description

Task

Required

The project task to which the cost budget line relates.

Ensure the cost projection class has Cost Task enabled.

AccountGroup

Required

The expense account group of the cost budget line.

Ensure the cost projection class has Account Group enabled.

CostCode

Optional

The cost code that is associated with the cost budget line.

The cost code can be specified if the cost projection class has Cost Code enabled.

If you want to use Cost Codes, ensure the feature is enabled on Enable/Disable Features (CS100000).

Leave this argument empty if the cost projection class does not include Cost Code. If you enter a value anyway, it must be an existing cost code.

InventoryId

Optional

The stock or non-stock item that is associated with the cost budget line.

The inventory ID can be specified if the cost projection class has Inventory ID enabled.

LineDescription

Optional

The description entered for the cost budget line.

ProjectedCostToComplete

Optional

The projected remainder of the budgeted cost for the cost budget line.

You can set the cost manually or calculate it using the following formula: Budgeted Cost - (Actual + Unbilled Committed Cost)

In Auto mode, supply this argument only if it is the single value you want the line calculated from. Leave the argument empty when you don’t supply it: a 0 counts as a value.

ProjectedQuantityToComplete

Optional

The projected remainder of the budgeted quantity for the cost budget line.

You can set the quantity manually or calculate it using the following formula: Budgeted Quantity - (Actual + Unbilled Committed Quantity)

In Auto mode, supply this argument only if it is the single value you want the line calculated from. Leave the argument empty when you don’t supply it: a 0 counts as a value.

ProjectedCostAtCompletion

Optional

The projected final cost at the moment of project completion for the cost budget line.

You can set the cost manually or calculate it using the following formula: Projected Cost to Complete + Actual Cost + Revised Committed Cost – Invoiced Committed Cost

In Auto mode, supply this argument only if it is the single value you want the line calculated from. Leave the argument empty when you don’t supply it: a 0 counts as a value.

ProjectedQuantityAtCompletion

Optional

The projected final quantity at the moment of project completion for the cost budget line.

You can set the quantity manually or calculate it using the following formula: Projected Quantity to Complete + Actual Quantity + Revised Committed Quantity – Invoiced Committed Quantity

In Auto mode, supply this argument only if it is the single value you want the line calculated from. Leave the argument empty when you don’t supply it: a 0 counts as a value.

ProjectedVarianceCost

Optional

The expected difference between the Projected Cost at Completion and the Budgeted Cost.

In Auto mode, supply this argument only if it is the single value you want the line calculated from. Leave the argument empty when you don’t supply it: a 0 counts as a value.

ProjectedVarianceQuantity

Optional

The expected difference between the Projected Quantity at Completion and the Budgeted Quantity.

In Auto mode, supply this argument only if it is the single value you want the line calculated from. Leave the argument empty when you don’t supply it: a 0 counts as a value.

ProjectedCompletedPercent

Optional

The projected percentage of completion for the cost budget line.

You can set the percentage manually or calculate it using the following formula: (Actual + Committed Open Cost) / Projected Cost at Completion * 100%

Enter a fraction, such as 0.266, or a value formatted as a percentage, such as 26.6%. In Auto mode, the function does not send this value, because Acumatica calculates it.

CalculationMode

Optional

The calculation mode that Acumatica applies to the cost budget line, shown in the Mode column on the Cost Projection (PM305000) form.

Accepted values: Manual (also FALSE or 0), Auto (also TRUE or 1). Text values are not case-sensitive.

Default value: Manual. An empty value also means Manual.

Calculation modes

The CalculationMode argument determines how many projected values you supply, and whether Acumatica derives the remaining ones.

Manual mode (the default). Supply the projected values you want to write. The function writes exactly the values you pass, and Acumatica does not recalculate the others from them. For an argument you leave empty, the function writes nothing:

  • On a new line, Acumatica fills the field with its default value, which is based on the budget and the actual amounts, not on the values you supplied.

  • On an existing line, the field keeps its current value.

In both cases the line’s values may not add up. For example, the variance can stay at 0 while the projected cost at completion is above budget. To keep a line consistent, supply all seven values, or use Auto mode.

Auto mode. Supply exactly one projected cost or quantity and omit the others. Acumatica calculates the remaining projected costs and quantities for the line and updates the revision header, including Projected Cost at Completion, so you no longer need to edit and re-save a line in Acumatica to bring the header totals in line with the detail rows.

Which single value you can supply depends on the cost projection class:

  • If the class includes Inventory ID, supply one of ProjectedCostToComplete, ProjectedCostAtCompletion, ProjectedVarianceCost, ProjectedQuantityToComplete, ProjectedQuantityAtCompletion, or ProjectedVarianceQuantity.

  • If the class does not include Inventory ID, supply one of ProjectedCostToComplete, ProjectedCostAtCompletion, or ProjectedVarianceCost. The quantity arguments are not accepted, so supplying a quantity on its own also returns an error.

The rule counts costs and quantities together: one cost plus one quantity is one value too many. Supplying none of the accepted arguments, or more than one, returns an error that begins Exactly one of the following arguments must be specified in 'Auto' mode and then lists the arguments accepted for your cost projection class. A 0 counts as a supplied value, so leave the arguments you don’t use empty.

In Auto mode, the function does not send ProjectedCompletedPercent, even if you supply it. Acumatica calculates the completion percentage for the line.

Auto mode requires the Velixo customization package build 20260806 or newer. Against an older package, or when the installed build cannot be determined, the formula returns: Using the Auto calculation mode for the cost projection writeback requires a newer version of the Velixo customization package. Please contact your ERP administrator to update it. To check which build is installed in your instance, see the Velixo Customization Project Release notes. Manual mode works with earlier builds.

Output

The function returns its status, which can be one of the following:

  • Pending - the formula is pending to be processed.

  • Line uploaded - the formula was processed successfully.

  • Error - an error occurred during the processing of the formula.

Examples

The examples write back the same cost budget line in three ways. Each uses its own revision, so you can run them independently. The line belongs to project TMR03, task 301 JRCONS, account group LABOR, and item CONSULTJR. Its budget is 3,000.00 for 60 hours, and 870.00 for 29 hours is already posted against it. The cost projection class TC07 includes Inventory ID, so the line is identified down to the item. Replace the values with your own project, class, and connection name.

Writing back a line in Manual mode

=WRITEBACKPROJECTCOSTPROJECTION(
    "Acumatica",
    "TMR03",
    "NOV26M",
    DATE(2026, 11, 30),
    "November 2026 projection",
    "TC07",
    "301 JRCONS",
    "LABOR",
    ,
    "CONSULTJR",
    "Junior consultant hours",
    2400,
    40,
    3270,
    69,
    270,
    9,
    0.266
)

Description: The formula projects that 2,400.00 and 40 hours remain to complete the line. It omits CalculationMode, so the line is written in Manual mode with the values supplied:

  • Projected cost at completion: 2,400.00 + 870.00 actual = 3,270.00

  • Projected quantity at completion: 69 hours

  • Variance cost: 270.00

  • Variance quantity: 9 hours

  • Completed percent: 0.266 (26.6%)

CostCode is empty because the class does not include Cost Code.

Result:

image-20261110-141751.png

Writing back a line in Auto mode from a projected cost

=WRITEBACKPROJECTCOSTPROJECTION(
    "Acumatica",
    "TMR03",
    "NOV26A",
    DATE(2026, 11, 30),
    "November 2026 projection",
    "TC07",
    "301 JRCONS",
    "LABOR",
    ,
    "CONSULTJR",
    "Junior consultant hours",
    ,
    ,
    3270,
    ,
    ,
    ,
    ,
    "Auto"
)

Description: The formula supplies only the projected cost at completion, 3,270.00, and sets CalculationMode to Auto. The other cost and quantity arguments are left empty, not set to 0, because a 0 counts as a second value. Acumatica sets the line’s Mode to Auto and calculates the rest of the line:

  • Projected cost to complete: 2,400.00 (3,270.00 minus the 870.00 already posted)

  • Variance cost: 270.00

  • Completed percent: 26.6% (870.00 / 3,270.00)

  • Quantities, converted at 30.00 per hour, the rate of the hours already posted: 109 hours at completion, 80 to complete, a variance of 49

Acumatica also updates the revision header totals.

Result:

image-20261110-141706.png

Writing back a line in Auto mode from a projected quantity

=WRITEBACKPROJECTCOSTPROJECTION(
    "Acumatica",
    "TMR03",
    "NOV26Q",
    DATE(2026, 11, 30),
    "November 2026 projection",
    "TC07",
    "301 JRCONS",
    "LABOR",
    ,
    "CONSULTJR",
    "Junior consultant hours",
    ,
    40,
    ,
    ,
    ,
    ,
    ,
    "Auto"
)

Description: The formula supplies only the projected quantity to complete, 40 hours. Acumatica prices the hours at the same rate of 30.00 per hour:

  • Projected cost to complete: 1,200.00

  • Projected cost at completion: 2,070.00

  • Variance cost: −930.00

  • Projected quantity at completion: 69 hours, a variance of 9

  • Completed percent: 42.0% (870.00 / 2,070.00)

Example 1 projects the same 40 hours to complete but a cost of 2,400.00, because in Manual mode you set the cost yourself. A quantity is accepted as the single value only because class TC07 includes Inventory ID. With a class that doesn’t, the formula returns an error.

Result:

image-20261110-141635.png