cancel
Showing results for 
Search instead for 
Did you mean: 

Populating Employee Responsible on Task in After Modify event

sumeet_narang
Active Participant
0 Kudos

Hi, I have a requirement to code the After Modify event of Task Extended BO. If the Category on the task has some specific value, then the Owner needs to change.

Below is the code I have put in the After Modify event:

var elActivityParty : elementsof Activity.Party;

if(this.GroupCode.content = "Z001")

{

elActivityParty.PartyName = "Sumeet Narang";

this.EmployeeResponsibleParty.Create(elActivityParty);

}

I am getting the error "Please enter a party with role Employee Responsible". The Employee Responsible is getting created, but the ID is blank. Also I am not able to change the PartyID as it is a read only field. What else needs to be done in this case?

Accepted Solutions (1)

Accepted Solutions (1)

former_member188030
Active Contributor
0 Kudos

Hi Sumeet,

What version of BusinessObjects Enetrprise are you using?

Also, could you post a complete code snippet of what you are doing and also the Enterprise assembly references you are using in your app.

- Bhushan

Senior Engineer

SAP Active Global Support

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

sumeet_narang
Active Participant
0 Kudos

Hi Bhushan,

We are using Cloud Application Studio 1408.

Below is the complete code in the After Modify event:

import ABSL;

import AP.PC.IdentityManagement.Global;

import AP.FO.BusinessPartner.Global;

import AP.PC.ActivityManagement.Global;

var elActivityParty : elementsof Activity.Party;

if (this.GroupCode.content == "Z001") {

elActivityParty.PartyName = "Sumeet Narang";

elActivityParty.RoleCode = "39"; //Employee Responsible = 39

this.EmployeeResponsibleParty.Create(elActivityParty);

}

Regards,

Sumeet

former_member183750
Active Contributor
0 Kudos

Hi Sumeet

If we look at the Overview for this SCN Space, we see the following:

SAP user community for SAP Crystal Reports, version for Visual Studio. Learn how to create & integrate Crystal reports into .NET applications and find the latest news, articles, tutorials, discussions, free downloads, blogs, sample apps, service packs and more

Is your question regarding any of the products described in the Overview? If not, please consult the  document for the best SCN Space for your query.

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

sumeet_narang
Active Participant
0 Kudos

Thanks Ludek. I have posted this in the correct forum now.

Answers (0)