Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Unit Schedule ID is Missing

(0) ShareShare
ReportReport
Posted on by 2,622

Hello Guys,

Any idea about this error (Unit Schedule ID is Missing).  I am setting GUID on product entity for Default Unit Schedule ID and Unit using the below code.

                EntityReference UoMGuid = CrmHelper.getDefautUnitGuid();

                ent["defaultuomscheduleid"] = UoMGuid.Id;

                EntityReference uom=new EntityReference("uom", new Guid("4F0400C5-1BBC-4CBD-A0FA-81B21E8AFB87"));

                ent["defaultuomid"] = uom.Id;

But after setting above code still getting the same error.

*This post is locked for comments

  • Vipin J Profile Picture
    Vipin J 1,583 on at
    RE: Unit Schedule ID is Missing

    I was encountering such exception during data import of products. I solved it using some trick in product.

    Refer to this article for complete understanding - vjcity.blogspot.com/.../the-unit-id-is-missing-for-product-in.html

  • Vikas Gupta Profile Picture
    Vikas Gupta 2,622 on at
    RE: Unit Schedule ID is Missing

    Thanks RajKumar and Andrew,

    But i guess this is the usual syntax to use Object.iD to assign the GUID to the field. Can you please explain what is the difference between UOM and UOM.ID. also in which scenario we should use object.id.

    Thanks Once again.

  • Verified answer
    RE: Unit Schedule ID is Missing

    Use - ent["defaultuomid"] = uom;

    instead of

    ent["defaultuomid"] = uom.Id;

  • Verified answer
    a33ik Profile Picture
    a33ik 84,325 Most Valuable Professional on at
    RE: Unit Schedule ID is Missing

    Hello Vikas,

    Try following code:

                   EntityReference UoMGuid = CrmHelper.getDefautUnitGuid();

                   ent["defaultuomscheduleid"] = UoMGuid;

                   EntityReference uom=new EntityReference("uom", new Guid("4F0400C5-1BBC-4CBD-A0FA-81B21E8AFB87"));

                   ent["defaultuomid"] = uom;

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... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans