on 01-08-2016 4:39 PM
Hello,
for a Customer Project we would like to create a BusinessPartner with Role Person. Each Person has to be Contact Person for an Account. When creating a Business Partner (Person) with a Before-Save-Script: How can I assign the Account to the Person?
I tried (which is not working):
var newBP : elementsof BusinessPartner;
newBP.CategoryCode = "1";
var newBusinessPartner= BusinessPartner.Create(newBP);
newBusinessPartner.CurrentCommon.Person.Name.GivenName = "ExampleGivenName";
newBusinessPartner.CurrentCommon.Person.Name.FamilyName = "ExampleFamiliyName";
newBusinessPartner.Activate();
var account : elementsof BusinessPartner.Relationship;
account.RelationshipBusinessPartnerInternalID = "1000495";
account.RoleCode.content = "BUR001-2";
var newRelationship = newBusinessPartner.Relationship.Create(account);
Thank you very much in advance & best regards,
Henning
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.