Can anyone help explain to me why this code errors out? I just wrote this to show the process. I'm receiving the error "Index -1 is either negative or above rows count." However it works as intended besides the error. What would be the correct process to have this working correctly?
called on ProjectAdapter AfterAdapterMethod
case "GetNewProject":
string prefix = "pre-";
string number = "1";
Project_DataView[0]["ProjectID"] = prefix + number;
I do have a BPM that gets the next ProjectID however due to us using multiple forms that follow different ProjectIDs I need to embed it into the form itself.
Thanks!
Don’t do this logic in the UI, instead do it in a BPM Post Process.
The reason it errors out is a timming issue the adapter event fires before the dataview is refreshed so it doesn’t have a Row.
Customizations -> Presentation / Layout Changes
BPM = Logic changes.
If you want to do it on different forms, read in the customization id from the call context..
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Friday, August 14, 2015 1:14 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Get Next ProjectID code E10 C#
Can anyone help explain to me why this code errors out? I just wrote this to show the process. I'm receiving the error "Index -1 is either negative or above rows count." However it works as intended besides the error. What would be the correct process to have this working correctly?
called on ProjectAdapter AfterAdapterMethod
case "GetNewProject":
string prefix = "pre-";
string number = "1";
Project_DataView[0]["ProjectID"] = prefix + number;
I do have a BPM that gets the next ProjectID however due to us using multiple forms that follow different ProjectIDs I need to embed it into the form itself.
Thanks!
Stephen Edginton (Beng) | Solutions & Technical Director |
||||||||
|
||||||||
Dot Net IT Limited, One St Kenelm Court, Steel Park Road, Halesowen, B62 8HD, United Kingdom.
|