# “Could not update Project Estimate record. Project can not be empty. Pick a valid Project ID” error while updating the IsPrimary column of the PjEstimate table in Sage Intacct.

**URL:** <https://community.cdata.com/t/could-not-update-project-estimate-record-project-can-not-be-empty-pick-a-valid-project-id-error-while-updating-the-isprimary-column-of-the-pjestimate-table-in-sage-intacct/476>\
**Category:** Data Sources\
**Tags:** article, sage-intacct, pjestimate, project-id, job-id\
**Created:** [October 23, 2023, 6:00pm UTC](https://community.cdata.com/t/could-not-update-project-estimate-record-project-can-not-be-empty-pick-a-valid-project-id-error-while-updating-the-isprimary-column-of-the-pjestimate-table-in-sage-intacct/476 "2023-10-23T18:00:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![margeritaq](https://avatars.discourse-cdn.com/v4/letter/m/c77e96/32.png) [@margeritaq](https://community.cdata.com/u/margeritaq)\
**Post date:** [October 23, 2023, 6:00pm UTC](https://community.cdata.com/t/could-not-update-project-estimate-record-project-can-not-be-empty-pick-a-valid-project-id-error-while-updating-the-isprimary-column-of-the-pjestimate-table-in-sage-intacct/476/1 "2023-10-23T18:00:47Z")

</div>

When trying to update the _IsPrimary_ column of the _PjEstimate (a.k.a Project Estimate)_ table, you will probably face the following error:

 ![db0427f2-2bfc-4955-9d31-0221e3c2094c.png](https://us1.discourse-cdn.com/cdata/original/1X/bee11c842b6ead68baa4be6b8705a41446398217.png)

_“Could not update Project Estimate record. Project can not be empty. Pick a valid Project ID”_

_Or_

_“Could not update Job Estimate record. Job can not be empty. Pick a valid Job ID”_

As ProjectID=JobID .

Before providing the solution, I would like to explain a few concepts. Let’s start with understanding what is an entity. [Entity](https://developer.intacct.com/api/company-console/entities/) is a type of location (a dimension) that is available in multi-entity shared companies only. Entities in Sage Intacct represent divisions, franchises, branches, partnerships, locations, and self-balancing funds which are single-handedly controlled by an entity using centralized Payables, Receivables, and a standard chart of accounts. The centralized entity has the term “Top Level” in Sage Intacct where a user can access all the entities (check out this [article](https://blogs.claconnect.com/intacct/multi-entity-shared-the-new-standard/) for more information). It’s important to note that **one Entity-Level Project Estimate cannot be updated from the Top-Level.**

Therefore, to avoid triggering the same error, when updating the _IsPrimary_ field of the _PjEstimate_ table, we must provide an Id representing the Entity to which the Project Estimate relates. Note that as far as we have seen, this is only required when updating the _IsPrimary_ column. However, updating the _Description_ column, for instance, does not require this input.

To locate the entity associated with the estimate, you can execute a query against the _PjEstimate_ table and retrieve this information from the _MegaEntityName_, _ **MegaEntityId** _, and _MegaEntityKey_ columns:

 ![12af9950-8a96-463b-9b5a-4fa31aafbdcd.png](https://us1.discourse-cdn.com/cdata/original/1X/15b6f2ef7ec8e22e2536424bcf025bf7fdb3959f.png)

How to provide the entity id, when updating this table from the driver? You should configure the [_LocationsId_](https://cdn.cdata.com/help/CTJ/xls/RSBIntacct_p_LocationsId.htm) or [_ClientID_](https://cdn.cdata.com/help/CTJ/xls/RSBIntacct_p_ClientID.htm) connection properties. In my case, I have set the _LocationsId_ property to the value of the _ **MegaEntityId** _ column:

 ![159964c7-5232-4086-b5fc-0abe3bbeeba8.png](https://us1.discourse-cdn.com/cdata/original/1X/7e14575cce9ef231abfd228d682e1df86a379d29.png)

Note that the _ClientId_ and _LocationsId_ values must belong to the estimate you are trying to update, otherwise it will throw the same error message “_Could not update Project Estimate record. Project can not be empty. Pick a valid Project ID_”.

The driver’s documentation clearly indicates that the [_LocationsId_](https://cdn.cdata.com/help/CTJ/xls/RSBIntacct_p_LocationsId.htm) and [_ClientId_](https://cdn.cdata.com/help/CTJ/xls/RSBIntacct_p_ClientID.htm) properties have distinct representations. That said, configure only one of them according to the type of child company (Entity) you are trying to configure (I have used the _LocationsID_ since I updated the estimate of a shared child company):

 ![38f7c4be-e876-4d1b-949c-119dce186cb4.png](https://us1.discourse-cdn.com/cdata/original/2X/e/ead9ef9c063356976bf15a8c8defd6bff790b3a9.png)

**Project Estimate Table**

| Name | Type | ReadOnly | Description |
| --- | --- | --- | --- |
| Recordno [KEY] | Long | True | Record number |
| PjestimateId | String | False | Estimate ID |
| **Isprimary** | **Bool** | **False** | **Primary** |
| Megaentitykey | Long | True | No description specified |
| Megaentityid | String | True | No description specified |
| Locationkey | Long | True | Location Key |
| Locationid | String | True | Location |
| Locationname | String | True | Location Name |
| Projectid | String | False | Project Id |
| Projectname | String | True | Project Name |

Please reach out to [support@cdata.com](mailto:support@cdata.com) if you run into any issues.
