Request History Buttons

Hello,

when you open My Responsibilites > Identities and select one there is the tab "Requests". There is the history of what that person ordered.

When you select one order, it will open up a sidesheet. And there will also buttons show up (i enabled it, before it didn't show). 



So now to my problem. The problem i have is with the button "Submit Again". When i press it, it should land in my shopping cart, but it doesn't because of a data error. It just copy the values of the order and adds it to the shopping cart.
But when yourself is not the person who ordered it, it will not show in my cart.

Now i found the service (request-history.service.ts) and wanted to change there the value of "PersonOrdered" but the backend changes it back. Or is the logic of "Submit again" meant like that?

 public async copyRequest(pwo: PortalItshopRequests): Promise<PortalCartitem> {
    //Custom: UserUid von aktueller (Benutzer) Session
    const busy = this.busyService.beginBusy();
    try {
      this.userUid = (await this.session.getSessionState()).UserUid;
    } finally {
      busy.endBusy();
    }
    
    const item = this.qerClient.typedClient.PortalCartitem.createEntity({
      Columns: {
        UID_AccProduct: {Value:pwo.UID_AccProduct.value},
      },
    });

    item.UID_PersonOrdered.Column.PutValue(this.userUid);
    item.UID_PwoSource.Column.PutValue(pwo.GetEntity().GetKeys()[0]);
    
    await this.qerClient.typedClient.PortalCartitem.Post(item);
    
    return item;
  }

We are using 9.2.

  • Hi,

    The idea of "Submit again" is to create a copy of the request as a cart item. On the server side, the "UID_PWOSource" parameter indicates the request to be copied.

    It's true that the handling of UID_PWOSource will overwrite the UID_PersonOrdered, but you should be able to make a separate request afterwards to set its UID_PersonOrdered value. I have not tried this though.