on 09-15-2014 8:21 AM
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
Hi All,
Just to close this thread, this issue is sorted in the 1411 release.
Thanks a lot for for inputs on this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Fernando,
Thanks very much for your response.
I already tried the above suggested.
Even while using the EmployeeResponsibleParty, if I don't pass the role code it gives me an error to populate the role code.
It creates a blank Employee Responsible row in the Involved Parties with no Employee ID and no details and the error as "Please enter a party with role Employee Responsible".
Appreciate some more suggestions on this.
Hi Meghna,
If the Employee Responsible is set, changing the Party Name doesn't do anything.
this.EmployeeResponsibleParty.PartyName = "Sumeet Narang"
The Employee responsible remains as the previous value only.
Ideally it should work. Is there something in the Business Configuration that could be missing?
I am manually able to change the Owner of the task on the UI.
Thanks and Regards,
Sumeet Narang
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.