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 HoldRelease).

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 Projections (PM305000) form.

The two modes require different arguments: Manual mode needs all seven projected values, Auto mode 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, which must be unique within the project. The length of the identifier, which can consist of only alphanumeric characters and spaces, can be up to 10 characters.

RevisionDate

Required

The date when the cost projection revision was created.

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 (SC100000).

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

Required if CalculationMode is Manual

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. Values you omit are not written by the function.

ProjectedQuantityToComplete

Required if CalculationMode is Manual

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. Values you omit are not written by the function.

ProjectedCostAtCompletion

Required if CalculationMode is Manual

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. Values you omit are not written by the function.

ProjectedQuantityAtCompletion

Required if CalculationMode is Manual

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. Values you omit are not written by the function.

ProjectedVarianceCost

Required if CalculationMode is Manual

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. Values you omit are not written by the function.

ProjectedVarianceQuantity

Required if CalculationMode is Manual

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. Values you omit are not written by the function.

ProjectedCompletedPercent

Required if CalculationMode is Manual

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%

In Auto mode this argument is optional, and it is not subject to the single-value rule. The function writes the percentage exactly as you pass it, in either mode.

CalculationMode

Optional

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

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

Default value: 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 all seven projected values: ProjectedCostToComplete, ProjectedQuantityToComplete, ProjectedCostAtCompletion, ProjectedQuantityAtCompletion, ProjectedVarianceCost, ProjectedVarianceQuantity and ProjectedCompletedPercent. The function writes exactly the values you pass, and Acumatica does not derive any of the others from them. This applies whatever your cost projection class: the three quantity arguments are required even when the class does not make Inventory ID mandatory.

If any of the seven is missing, the formula returns an error naming what to add, for example Argument 'ProjectedCompletedPercent' is required in 'Manual' mode, or Arguments 'ProjectedQuantityToComplete', 'ProjectedQuantityAtCompletion', 'ProjectedVarianceQuantity' are required in 'Manual' mode when several are missing. The mode name appears in English in these messages, whatever your display language.

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 makes Inventory ID mandatory, supply one of ProjectedCostToComplete, ProjectedCostAtCompletion, ProjectedVarianceCost, ProjectedQuantityToComplete, ProjectedQuantityAtCompletion, or ProjectedVarianceQuantity.

  • If the class does not make Inventory ID mandatory, 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.

ProjectedCompletedPercent is neither a cost nor a quantity, so it is not subject to this rule. Supply it alongside your single cost or quantity value when the line needs a projected completion percentage, and omit it when it does not.

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.