Is the clone-API allready aware of the fact that an autonumb

Posted by Wim on 16-Nov-2016 03:32

This might still be an issue, any news on this?

We want to create a new order, but the ordernumber field has the functionality of 'autonumber'.

By cloning this record the ordernumber is not automatically updated.

(we use the clone api for creating credit-orders in some occassions)

All Replies

Posted by Anvi Jain on 17-Nov-2016 04:01

Hi Wim,

I have verified the case and it still seems to be an issue. A bug(id-59150) has been logged for this.

However as a workaround I would suggest you to clone the record using the data record page.

In case of cloning through the API(serverSide) you can refer the example below:

var auto=rbv_api.selectNumber("SELECT ordernumber FROM Orders order by createdAt desc");
var x = new Array();
x["ordernumber"]=auto+1;
rbv_api.cloneRecord("Orders", {objectId}, x);

Thanks,

Anvi

Posted by Wim on 17-Nov-2016 04:14

Thanks for your reply; is it correct hat the autonumber sequence (as it is its property – autonumber) is also set in this way.
The cloned record wil get the ordernumber that is required (last + 1). That looks clear.
But will the ordernumber field also be updated and then hold the updated number for the next orders to come?
 
Kindly reply, of course we will test suggested approach.
 
Wim Hassink
 
 
 
Van: Anvi Jain [mailto:bounce-anjain@community.progress.com]
Verzonden: donderdag 17 november 2016 11:03
Aan: TU.Rollbase@community.progress.com
Onderwerp: RE: [Technical Users - Rollbase] Is the clone-API allready aware of the fact that an autonumber field should be updated accordingly
 
Update from Progress Community
 

Hi Wim,

I have verified the case and it still seems to be an issue. A bug has been logged for this.

However as a workaround I would suggest you to clone the record using the data record page.

In case of cloning through the API(serverSide) you can refer the example below:

var auto=rbv_api.selectNumber("SELECT ordernumber FROM Orders order by createdAt desc");
var x = new Array();
x["ordernumber"]=auto+1;
rbv_api.cloneRecord("Orders", 339180, x);

Thanks,

Anvi



View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

 

Posted by Anvi Jain on 18-Nov-2016 01:03

Hi Wim,

The auto number field gets updated with the number assigned to the last record. The approach is however a bit different. Yes,for the upcoming orders,the ordernumber field will automatically pickup the next value.

Please let me know if you need any other help regarding this.

Thanks,

Anvi

Posted by Wim on 18-Nov-2016 03:52

Hello Anvi Jain,
 
Thank for the information, i have tested it and it works fine.
 
Regards, Wim
 
Van: Anvi Jain [mailto:bounce-anjain@community.progress.com]
Verzonden: vrijdag 18 november 2016 08:06
Aan: TU.Rollbase@community.progress.com
Onderwerp: RE: [Technical Users - Rollbase] Is the clone-API allready aware of the fact that an autonumber field should be updated accordingly
 
Update from Progress Community
 

Hi Wim,

The auto number field gets updated with the number assigned to the last record. The approach is however a bit different. Yes,for the upcoming orders,the ordernumber field will automatically pickup the next value.

Please let me know if you need any other help regarding this.

Thanks,

Anvi

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

 

This thread is closed