Skip to main content
Solved

Set default value for a list using BPA

  • January 11, 2024
  • 2 replies
  • 357 views

Forum|alt.badge.img+10

I’m trying to set a default value for the Supplier Invoice Consideration list on the Inventory Part Page using BPA.

 

 

The BPA is able to set the note to Ignore Invoice Price, but is not able to put that value in the Supplier Invoice consideration

 

When adding execution.setVariable('InvoiceConsideration', 'Ignore Invoice Price');

and the variable in the ExportValue Section I get the following error 

 

InventoryPart/Form (server error)
Error while serializing contents.

 

see file (serializingBPA)

 

 

the field is present in the REST CALL response : 

….

    "TechnicalCoordinatorId": null,
    "InvoiceConsideration@odata.type": "#IfsApp.InventoryPartHandling.InvoiceConsideration",
    "InvoiceConsideration": null,
    "MaxActualCostUpdate@odata.type": "#Decimal",
    "MaxActualCostUpdate": null,

….

see file (defaultPartResponse.txt)

 

Thnak’s in advance for your help

Best answer by kamnlk

In here InvoiceConsideration is an Enum value, so you need to use the correct key value to get the desired behavior.

 

 from the api docs you can get that value 

 

and in the workflow designer

 

2 replies

Forum|alt.badge.img+9
  • Hero (Employee)
  • 137 replies
  • Answer
  • January 11, 2024

In here InvoiceConsideration is an Enum value, so you need to use the correct key value to get the desired behavior.

 

 from the api docs you can get that value 

 

and in the workflow designer

 


Forum|alt.badge.img+10
  • Author
  • Hero (Customer)
  • 122 replies
  • January 11, 2024

That solved it for me thank’s

 

In here InvoiceConsideration is an Enum value, so you need to use the correct key value to get the desired behavior.

 

 from the api docs you can get that value 

 

and in the workflow designer