Skip to Content

Extension object/scenario to standard BO, problem

Dear Experts,

I create extension field ( " element IDprzypisania:ID; " ) to standard business object AP.PC.ActivityManagement.Global:Activity and i create Process Extension Scenario to add this field to standard query (QueryByElements). To this moment everything works fine I can see this field in the query. In soapui i can search by this field.

And now i want to copy to value from standard filed "ID" to my custom "IDprzypisania". The problem is that when i try to do this by statment: "this.IDprzypisania = this.ID; " i get error that: "IDprzypisania' is read-only and cannot be changed" and i don't know why...
The deployment Unit solution is the same as the standard business object.

I have a second question/problem. Is it possible to add this field to response from the "stadard querybyelement"? I want to see this field when i search by e.g. ID.

soapui.png (83.5 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jun 04, 2018 at 10:28 AM

    Hi Jakub,

    Where did you write your assignment logic?

    Please write After-Modify or Before-Save absl. You cannot write in On-Save absl.

    And since you've already created PES to add your field to Query, it should show on response too.

    But, if your field doesn't have data value, it will not be seen on response.

    Regards, May

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 04, 2018 at 11:07 AM

    Hi,

    You're right in the wrong place I wrote the code. But i have problem with the second part. Now i write the code in Event-AfterModify. In debug mode when the first time "enetr the code",

    this.IDprzypisania = this.ID;
    var queryyy = this.QueryByElements;
    var parms = queryyy.CreateSelectionParams();
    parms.Add(queryyy.IDprzypisania_5PEND6QL5482763O1SFB05YP5 , "I" ,"EQ" , this.IDprzypisania);

    Works fine, it fill the "IDprzypisania", but when i modify the second time the "IDprzypisania" is empty. It dosen't have an earlier vlaue.


    absl.png (6.6 kB)
    Add comment
    10|10000 characters needed characters exceeded