cancel
Showing results for 
Search instead for 
Did you mean: 

Create new Contact Person with Cloud Application Studio

henning_ohlmeyer
Participant
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

I have the same problem, you able to fix it? You can share how please

thanks,

regards,

Joe Gonzales.