Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

Error while posting Project time sheet. info log says :The value <projectid> does not exist for <legalentity>

(0) ShareShare
ReportReport
Posted on by

Hi there,

This is a Dynamics AX2012 R3 CU13 environment.

I am trying to post a project time sheet in the Project Management module.

While posting, the info log throws an error : The value <projectid> does not exist for <legalentity>

The strange thing is the projectID mentioned in the info log is not the project id selected in the timesheet line. 

In fact, the project id belongs to another legal entity.

Tested the same scenario in all the available legal entities, the info log shows exactly the same (wrong) project id every time in every legal entities

Any thoughts would be appreciated

Thanks

Riyas

  • Charan Bhamidi Profile Picture
    20 on at
    Error while posting Project time sheet. info log says :The value does not exist for
    We encountered this in R3 CU13 as well. After looking into this, I suspect that this is a bug. There are two reasons - firstly in the class TSTimesheetsPost method validatePost() there is a check whether the TSTimesheetLine is intercompany. However, when it does this check the record buffer for TSTimesheetLine is empty. 
    protected static boolean validatePost(TSTimesheetTable _tsTimesheetTable)
    {
        TSTimesheetLine         
    tsTimesheetLine;
        TSTimesheetLineWeek     tsTimesheetLineWeek;
        TSTimesheetTrans        tsTimesheetTrans;
        COSMovements_Project    cosMovements_Project;
        ProjJournalTrans        projJournalTrans;
        ProjTrans               projTrans;
        boolean                 retVal = (_tsTimesheetTable.ApprovalStatus == TSAppStatus::Approved);
        TSTimesheetsPost        tsTimesheetsPost;
        if (retVal && (!_tsTimesheetTable.checkProjId() || !_tsTimesheetTable.checkReqActivity()))
        {
             retVal = false;
        }
        else
        {
            // transition the lines to fully distributed, if this is not possible the line is not ready to be submitted
            SourceDocumentProcessorFacade::submitSourceDocumentLinesForHeader(_tsTimesheetTable, SourceDocumentLineAccountingStatus::FullyDistributed);
            retVal = retVal && SourceDocumentProvider::areSourceDocAccDistAccountValid(SourceDocumentHeader::find(_tsTimesheetTable.SourceDocumentHeader), true, true);
            if (retVal && (
    tsTimesheetLine.isIntercompany()) && (_tsTimesheetTable.ApprovalStatus == TSAppStatus::Approved))
            {
                tsTimesheetsPost =  new TSTimesheetsPost(_tsTimesheetTable);
                retVal = tsTimesheetsPost.validateProjFinancialDim(_tsTimesheetTable);
            }

    The record buffer being empty, the only value it seems to hold is the default DataAreaId of the current legal entity. And the method isIntercompany() only checks whether the record's ProjectDataAreaId value is the same as the DataAreaId. If the record is empty, then the ProjectDataAreaId is blank, which is not equal to the defaulted DataAreaId (current legal entity) of the empty record. So, it returns a true value causing the condition to be met even though it shouldn't. 
    The second reason for my belief this is a bug is what happens in the tsTimesheetsPost.validateProjFinancialDim() method that is called above.
    while select crossCompany projTable
            exists join dimensionAttributeValue
                exists join dimensionAttributeValueSetItem
                    exists join tsTimesheetLine
                        where projTable.RecId == dimensionAttributeValue.EntityInstance &&
                            dimensionAttributeValue.RecId == dimensionAttributeValueSetItem.DimensionAttributeValue &&
                            dimensionAttributeValueSetItem.DimensionAttributeValueSet == tsTimesheetLine.DefaultDimension &&
                            tsTimesheetLine.TimesheetNbr == _tsTimesheetTable.TimesheetNbr
        {
            if (projTable && (projTable.dataAreaId != curext()))
            {
                error(strfmt("@SYS326454", projTable.ProjId, curext()));
                retVal = false;
            }
        }
    Here, the while select does not check whether the DimensionAttribute value on the DimensionAttributeValue record happens to be the correct Attribute for a Project dimension. So, in our case, even if the DimensionAttribute value on the relevant DimensionAttributeValue records (for Department, ProductLine, Site in our case) have the EntityInstance values that coincidentally equal the Record IDs of any Projects in any legal entity, it grabs those Project records in this query. 
    I think we would have to add a bug fix.
     
  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at
    RE: Error while posting Project time sheet. info log says :The value <projectid> does not exist for <legalentity>

    Hi RiyasBhai,

    The error seems to be related to your findims, not the project itself.

    Can you check

    (a) what findims are setup in your timesheet and

    (b) what findims are setup at the project level?

    There must be an invalid value.

    Best regards,

    Ludwig

  • Community Member Profile Picture
    on at
    RE: Error while posting Project time sheet. info log says :The value <projectid> does not exist for <legalentity>

    Hi,

    On another thought, for posting the timesheet, is it mandatory to have Project as a financial dimension?

    In our AX financial dimension setup, we don't have "Project" as a dimension until now.

    So, I was wondering if there is anything like that.

    Appreciate your comment on this, thanks

    Riyas

  • Community Member Profile Picture
    on at
    RE: Error while posting Project time sheet. info log says :The value <projectid> does not exist for <legalentity>

    This is the info log and the corresponding class

    FYI

    pastedimage1617701005817v1.png

  • Community Member Profile Picture
    on at
    RE: Error while posting Project time sheet. info log says :The value <projectid> does not exist for <legalentity>

    Hi Ludwig,

    Yes, I can post the Hour journal directly, no problems

    Screenshot for the Project time sheet setup is shown below. 

    Any other screens required, pls let me know

    pastedimage1617699794596v1.png

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at
    RE: Error while posting Project time sheet. info log says :The value <projectid> does not exist for <legalentity>

    Hi Riyas,

    I wonder if you could post time on the project if you post if through an hour journal.

    Also, can you share what has been setup in regards to the project timesheet usage?

    Some screenprints would help.

    Many thanks,

    Ludwig

  • Community Member Profile Picture
    on at
    RE: Error while posting Project time sheet. info log says :The value <projectid> does not exist for <legalentity>

    Hi Andre,

    This is the first time I am checking this.  We are using project module but haven't used time sheet functionality yet.

    No customizations are done on this area

    Riyas

  • André Arnaud de Calavon Profile Picture
    293,238 Super User 2025 Season 1 on at
    RE: Error while posting Project time sheet. info log says :The value <projectid> does not exist for <legalentity>

    Hi Riyas,

    Can you tell if this worked correctly before? If so, what had changed?

    Do you have customizations or an add-on in this environment?

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,238 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,923 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans