web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Edit Business Unit C#

(0) ShareShare
ReportReport
Posted on by 66

Hello,

I have a custom field in Business Unit entity and I want to edit it in a C# plugin. Is it possible to do this or is the entity Business Unit not editable? (neither from C # code or workflow).

int lastUsedNumber = (int)(businessUnit["alten_accountnumberofseries"]);
lastUsedNumber = lastUsedNumber  ;

businessUnit["alten_accountnumberofseries"] = lastUsedNumber;

wod_CrmService.Update(businessUnit);

I have the same question (0)
  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    Can you please provide the code that you use to retrieve/insantiate businessUnit record?

    Other than that you can replace line

    lastUsedNumber = lastUsedNumber++;

    with just

    lastUsedNumber++;

  • Simone Colombo Profile Picture
    66 on at

    I am a fool. The problem was trivially the lastUsedNumber enhancement.

    Now it works, thankk you very much.

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello Simone,

    If my reply (or replies) answers your question take a minute and verify the answer. You can do it by clicking "Yes" at the top of the reply (or replies) under the label "Does this answer your question?"

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

#2
ManoVerse Profile Picture

ManoVerse 62 Super User 2026 Season 1

#3
11manish Profile Picture

11manish 43

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans