Hi Sylvain,
Below I am giving my requirement in bit detail
When creating a new account in CRM UI (Create Corporate Account) and the userid creating the account has a security role = Say 'SX' , perform the following two tasks.
- Automatically add Role = ZXXXX to the new account
- Automatically add Relationship = ZXXX with a relationship to the Disti Group account associated with the userid.
a. The Disti Group account associated with the userid will be derived as follows:
- Using the employee vendor number, find the relationship of (employee responsible) to an account with the role of ZXXXX(Disti Group)
- UserID and employee # is already determined in the account creation process as it is used to add the employee responsible relationship.
- BAPI_BUPA_RELATIONSHIPS_GET may be used
- The first account found with in step i will be used as the relationship partner for the ZXXXX(Disti Group)relationship
- If no account is found in step i, do not add the ZXXXX(Disti Group)relationship
Do let me know in case you need more clarification.
Regards
Ankesh