HcmWorkerV2

I was asked to investigate why some changes disappeared from Employess form in F&O. If I open Human resources > Workers > Employees and right-click the form, it shows that its name is HcmWorker.

That’s expected. But it’s a lie.

There is a feature called Streamlined employee entry (HcmWorkerV2Feature class) and if it’s enabled, another form (HcmWorkerV2) opens instead of HcmWorker.

Microsoft implemented the logic in init() method of HcmWorker form. If the feature is enabled, HcmWorkerV2 opens and HcmWorker is closed.

if (HcmFeatureStateProvider::isFeatureEnabled(HcmWorkerV2Feature::instance()))
{
    this.redirectToHcmWorkerV2();
    this.lifecycleHelper().exitForm();
}

But the logic that shows Form information isn’t aware of it for some reason; it knows that we’re opening HcmWorker and it believes it’s really been opened.

By the way, if I press F5 and reload the form, Form information starts showing the right form name.

If we want our customizations to work in both cases (with the feature enabled or disabled), we need to change both forms.

By the way, if you want to read more about the new form, here is a documentation page: Streamlined employee navigation and entry.

3 Comments

  1. It appears to be a known issue.

    Issue 757617 – Resolved
    After enabling Streamlined employee entry” feature, Workers button on the store form throws “Object reference not set to an instance of an object.”

  2. Hi Martin and good catch! Thank you for sharing these details.

    When upgrading to PU 10.0.31 (we skipped pu 10.0.30 when feature HcmWorkerV2Feature was made on by default) we also came across this issue.

    It’s a pity we can’t trust the small dialogue, telling form’s name, anymore. Do you expect MS could fix it – have you created a ticket on this?

    I’d say it’s an unusual approach to create a new form, instead of replacing/upgrading the existing one. Many links (especially extensions) will be broken in such way.

Leave a Reply

Your email address will not be published. Required fields are marked *