cancel
Showing results for 
Search instead for 
Did you mean: 

Populating the Owner(Employee) on the Activity Task

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". However 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 (0)

Answers (2)

Answers (2)

ankurgodre
Active Contributor
0 Kudos

Hi Sumeet,

Before updating the user, you should also code for the Party Role which needs to get updated with the new Owner in this case which should be "Employee Responsible" as the Code needs to realize as to which Role needs to be updated with the new user.

Try this I hope it helps.

BR

Ankur

sumeet_narang
Active Participant
0 Kudos

Hi Ankur,

Thanks for your response.

I coded for the role, also tried the options of passing the employee ID in the Party name.

But it is still not populating the Owner.

Regards,

Sumeet

Former Member
0 Kudos

Check in Business configuration for that particular role and see if manual changes are forbidden. Screen shot below for Activities-Task config. Hope it helps and please keep the forum posted.

Regards

Jai

sumeet_narang
Active Participant
0 Kudos

Hi Jai,

Thanks for the response. I checked in the config and it looks fine.

I am also able to change the Owner on the UI screen though I am not able to change it from the code.

Former Member
0 Kudos

Gochya. I think you should also post this in SDK forum where technical experts could share their thoughts.

sumeet_narang
Active Participant
0 Kudos

Thanks Jai. I have raised this to the SDK forum as well.

Will keep this post open until that is answered.