[progress Communities] [progress Openedge Abl] Forum Post: Re: Cloning An 'order' Record...

Status
Not open for further replies.
W

Wim

Guest
Dear Ruben, My apologies fort he inconvenience on this question, but normally you guys are very quick in answering our questions! And this question is urgent for our customer. Looking at your answer i need to write a lot of code because there are a lot of fields in my ‘order’ record. However thanks very much for his answer, i will absolutely try to achieve it the way you describe it. Regards, Wim Hassink Van: Ruben Dröge [mailto:bounce-rdroge@community.progress.com] Verzonden: woensdag 17 augustus 2016 11:24 Aan: TU.Rollbase@community.progress.com Onderwerp: RE: [Technical Users - Rollbase] Cloning an 'order' record that has a automatic number field for 'ordernumber; field Update from Progress Community Ruben Dröge If your auto-number field is an integer field you could also do something like this I guess, otherwise, you'd need to cut out the integer part, add +1 and then add the characters to it again: var v_newarr = []; var arr = rbv_api.selectQuery( "select AutoNumber from Order ORDER by AutoNumber DESC", 1); var numberpart = arr[0]; var number = numberpart[0]; v_newarr['Description'] = 'Clone Order'; v_newarr['AutoNumber'] = number + 1; createNewRecord(v_newarr); function createNewRecord(recarr) { rbv_api.cloneRecord("Order", {!id}, v_newarr); } This apart from the fact that I think the clone api should be aware of auto-numbering.... 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.

Continue reading...
 
Status
Not open for further replies.
Top