Overview
The Adjust Cost Routine finalizes inventory costs and updates related transactions throughout GoldFinch. Running this routine regularly is essential to ensure accurate inventory valuation, cost of goods sold, profitability reporting, and financial statements.
This routine is typically scheduled to run nightly after all inventory posting activities are complete.
What the Adjust Cost Routine Does
The routine performs the following tasks:
- Finalizes costs for finished Work Orders.
- Finalizes costs for posted Kit BOM Journals.
- Updates outbound inventory costs when inventory is sold before its final cost is known.
- Updates Warehouse Shipment Line costs.
- Updates Sales Invoice Line costs for accurate profitability reporting.
- Updates the Average Base Unit Cost on the Item Card.
Timing Differences
Cost adjustments are often required because inventory may be shipped before its final cost is available.
Common examples include:
- A Purchase Receipt is shipped before the Vendor Invoice is posted.
- A manufactured item is shipped before the related Work Order has been completed and costed.
After the final cost becomes available, the Adjust Cost Routine automatically updates all affected inventory transactions and financial records.
Posting Date Behavior
Normally, Cost Adjustment Entries and the related General Ledger Entries use the Posting Date of the original Item Ledger Entry.
However, if that Posting Date is earlier than the Allow Posting From date defined in Company Setup, GoldFinch uses the Allow Posting From date instead.
This prevents adjustments from posting into closed accounting periods.
Recommendation
After completing Month-End Closing, update the Allow Posting From and Allow Posting To dates in Company Setup to the new accounting period. This ensures future cost adjustments are posted into the correct financial period.
If selected users need permission to post into a previous accounting period, update their individual posting date range in User Setup.
Scheduling the Routine
Schedule the routine using the GoldFinch Job Scheduler – GoldFinch Clientcare
| Setting | Value |
|---|---|
| Apex Class | BatchILECostAdjustment |
| Frequency | Nightly |
| Run Time | After all inventory posting routines have completed |
Before Closing an Accounting Period
Before closing a month:
- Open Item Ledger Entries.
- Run the Pending Cost Adjustment view.
Verify that no Item Ledger Entries remain with Pending Cost Adjustment = True.
Any remaining entries should be investigated before closing the accounting period.
Troubleshooting Pending Cost Adjustments
If Item Ledger Entries remain pending after the nightly job has completed:
Step 1 — Run the Routine Manually
Temporarily unschedule the nightly job, then click Run Now to execute the Adjust Cost Routine immediately.
After the routine finishes, remember to restore the nightly schedule.
Step 2 — Review Apex Jobs
Navigate to Setup → Apex Jobs and verify that the Adjust Cost Routine completed successfully.
Review any errors reported by Salesforce.
Step 3 — Contact GoldFinch Support
If Pending Cost Adjustment entries still remain after rerunning the routine and reviewing Apex Jobs, submit a support ticket to the GoldFinch Support Desk.
Proactive Monitoring
To identify problems quickly:
- Create a report showing all Item Ledger Entries where Pending Cost Adjustment = True.
- Subscribe to the report.
- Schedule the report to run nightly after the Adjust Cost Routine.
This provides early notification whenever cost adjustments fail to complete.
Common Cause: Salesforce Governor Limits
The most common cause of Pending Cost Adjustment entries is the Adjust Cost Routine exceeding Salesforce governor limits.
This is typically caused by custom Apex triggers executing during cost adjustment processing.
Objects commonly affected include:
- Sales Invoice
- Sales Invoice Line
- Warehouse Receipt
- Warehouse Receipt Line
- Warehouse Shipment
- Warehouse Shipment Line
- Item Journal
- Item Journal Line
- Work Order
- Work Order Line
- Item
- Item Ledger Entry
- Product
Recommendation
If your organization has custom Apex triggers, implement conditional logic to bypass nonessential custom processing while the Adjust Cost Routine is running. This significantly improves performance and reduces the likelihood of governor limit exceptions.
For GoldFinch Support Staff
Some errors may not appear in Salesforce Apex Jobs.
When additional troubleshooting is required:
- Log in using the Subscriber Console.
- Navigate to:
Administration → Inventory → Run Manual Adjust Cost Routine - Execute the routine manually.
Running the routine from the Subscriber Console provides more detailed diagnostic information than the standard scheduled job, making it easier to identify and resolve processing errors.
Comments
0 comments
Please sign in to leave a comment.