Has anybody tried to delete the Supplier pricelist using the BO method? I am trying it in App studio using the calling function to delete but it is giving me Error Code 500. It is even the same when I tried it using BPM and calling the same BO Method.
Same way you called DeleteByID. Just call Update instead after setting the RowMod value in your tableset.
Something akin to this:
this.CallService<Erp.Contracts.VendPart>( vpBO = >
{
Erp.Tablesets.VendPartTableset vpTS = vpBO.GetByID(yourKey);
vpTS.VendPart[0].RowMod = "D"; // Your index may not be zero. Find your own.
vpBO.Update(ref vpTS);
});
Modify as needed; I did not test the syntax or viability.
Depends on if there’s multiple pricelists in the GetByID. If that’s true, you would need to iterate through them all to find the right one based on your criteria.
If you’re getting the same error, you should still go to the server’s Event Viewer to see the specific error.
It’s possible it’s not letting you delete it because it’s being used somewhere.