Get Next ProjectID code E10 C#

Thanks Stephen,  I didnt realize there was a customizationID in the call context.

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!

#ygrps-yiv-1698110233 P.ygrps-yiv-1698110233b1e7fd89-0279-4ffe-a16a-1f1bcba0d537 { MARGIN:0cm 0cm 0pt;} #ygrps-yiv-1698110233 LI.ygrps-yiv-1698110233b1e7fd89-0279-4ffe-a16a-1f1bcba0d537 { MARGIN:0cm 0cm 0pt;} #ygrps-yiv-1698110233 DIV.ygrps-yiv-1698110233b1e7fd89-0279-4ffe-a16a-1f1bcba0d537 { MARGIN:0cm 0cm 0pt;} #ygrps-yiv-1698110233 TABLE.ygrps-yiv-1698110233b1e7fd89-0279-4ffe-a16a-1f1bcba0d537Table { MARGIN:0cm 0cm 0pt;} #ygrps-yiv-1698110233 DIV.ygrps-yiv-1698110233Section1 { }

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

Mobile:  +44 7734 858415
DDI:  +44 121 314 1179
Main:  +44 (0) 121 314 1170
Web:  www.dotnetit.co.uk

Dot Net IT Limited, One St Kenelm Court, Steel Park Road, Halesowen, B62 8HD, United Kingdom.

DotNetIT

Epicor Platinum Partner

Epicor Alliance Partner