Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9091

Create new Contact Person with Cloud Application Studio

$
0
0

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


Viewing all articles
Browse latest Browse all 9091

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>