Skip to Content

How to populate Buyer Responsible fields in BO Purchase Request by our own values (ByD)?

Dear experts,

We would like to have our own values in fields Buyer Responsible ID / Name of Purchase Request. There is some ByD standard functionality that populates these fields (during creating PR), but we want to use our own algorithm. Is that feasible (in principle) to implement via some development?

Thank you.

000330.jpg (146.3 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    May 08 at 08:54 AM

    After all I created my own (extension) fields BuyerResponsibleID2 and BuyerResponsibleName2 to maintain the needed functionality.

    Aleksei

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 01 at 02:53 AM

    Hi Aleksei,

    I think it is possible.

    The node EmployeeResponsibleItemParty is for the Buyer Responsible in PurchaseRequest.

    It depends on your algorithm, and the follow up requirement.

    Best Regards,

    Benny Huang

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 01 at 08:09 AM

    Thank you Benny,

    Yes, the elements look accessible to modify but

    I tried to change the value of field Buyer Responsible ID in a Purchase Request via Root-Event-BeforeSave.absl:

    import ABSL;
    
    foreach ( var item in this.Item ) {
    	if ( item.EmployeeResponsibleItemParty.IsSet() ) {
    		item.EmployeeResponsibleItemParty.PartyKey.PartyID.content = "7000022";
    	}
    }
    
    
    

    Unfortunately, without any effect. There were no changes in the Purchase Request after that.

    I also tried changing via element item.ItemParty , or adding and deleting an instance of ItemParty collection, but all the same - no changes.

    var itemPartyData : elementsof item.ItemParty;
    itemPartyData.PartyKey.PartyID.content = "7000022";
    var itemParty = item.ItemParty.Create ( itemPartyData );
    //itemParty.PartyKey.PartyTypeCode = "147";
    
    

    Element itemParty.PartyKey.PartyTypeCode appeared to be Read-Only at all.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 05 at 10:12 AM

    Aleksei,

    What about trying to change it on the purchase order itself, before it's released?

    Lewis

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 06 at 09:01 PM

    Hello Lewis,

    It does not suit.

    We need to prevent creating a Purchase Order by anyone but who we set in the Purchase Request.

    P.S. It seems some mess occurred with text types in BO extensions. I am totally confused.

    What data type should I now use for Employee Name, for example?

    Aleksei

    Add comment
    10|10000 characters needed characters exceeded