Skip to Content

Defaulting owner and sales organization in new account create page in C4C

Dear Expert,

we have requirement to default login user as owner and login user primary sales org to sales organization in the account create page .

we have written custom logic in customer xbo Root Node - Event AfterModify to determine owner and sales organization from login user. our custom logic is executed in back end when creating new account , but value is not displaying in the UI, while saving the account only the value is displaying in the UI.

The custom logic is written in Customer XBO Root Node – AfterModify event.


var identity = Identity.Retrieve(Context.GetCurrentIdentityUUID());

var employee = BusinessObject::Employee.Retrieve(identity.BusinessPartnerUUID);

var EmployeeResponsible = this.EmployeeResponsibleSales;



var employeeRes : elementsof Customer.CurrentEmployeeResponsible;

employeeRes.PartyRoleCode = "142";

employeeRes.EmployeeUUID = employee.UUID;

employeeRes.DefaultIndicator = true;



if(this.SalesArrangement.Count() == 0)


var salsorgAssign = employee.OrganisationalUnitAssignment;

foreach(var orgunit in salsorgAssign)


if(orgunit.RoleCode == "219")


var Assignsalesorg = SalesArrangement.Create();

Assignsalesorg.CustomerUUID = this.UUID;

Assignsalesorg.SalesOrganisationUUID = orgunit.ToRoot.UUID;



Assignsalesorg.DistributionChannelCode = orgunit.ToRoot.DistributionChannelAndDivision.GetFirst().DistributionChannelCode;

Assignsalesorg.DivisionCode = orgunit.ToRoot.DistributionChannelAndDivision.GetFirst().DivisionCode;





When clicking new button our custom code is executed but value is not displayed in the UI, when saving the account only its displaying the value.



Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jul 08 at 01:18 PM

    Hi jeyakumar Asai,
    I would suggest to use workflow to set a default owner:
    2506111 - Assign the Logged on User as the Account Owner When Creating an Account
    Regarding Sales Area Determination please check if the following blog answers your needs:

    Automatic Sales Area Determination during Account Creation – New 1911 enhancement


    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Bartosz ,

      Thanks for your reply.

      I have already checked this link you have shared.

      This workflow rule is executed while saving account only, but our requirement is to default owner and sales organization when clicking new button .in the account.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.