Skip to Content
avatar image
Former Member

Populating Employee Responsible on Task in After Modify event

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:

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);

}

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? We are using Cloud Application Studio 1408.

Regards,

Sumeet

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Sep 15, 2014 at 05:10 PM

    Hi Sumeet,

    Try changing from this line:

    this.EmployeeResponsibleParty.Create(elActivityParty);


    To this one:

    this.Party.Create(elActivityParty);


    I believe the fact you are already filling the role code as "Employee Responsible" should automatically populate "EmployeeResponsibleParty". In case you already have one, you might need to delete it.

    Try to play with that and let us know the outcome. 😉

    Thanks.

    Fernando

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 03, 2014 at 10:02 AM

    Hi All,

    Just to close this thread, this issue is sorted in the 1411 release.

    Thanks a lot for for inputs on this.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Sumeet,

      There is one workaround which works fine for me, and I figured out last friday.

      You can simply assign the BP ID to the PartyName field:


      yourActivityTask.ProcessorParty.PartyName = partyBPID;


      This will automatically load all the new party's data.

      Just have a try and let me know.

      Thanks!

      Fernando