CopyRecordRequest

Can I set column values when using crt.CopyRecordRequest ? 
I have a use case where I need to create a copy of the record but change several column values in the new record. 
Is there a way to do it? 
 

Like 0

Like

2 comments
Best reply

If this is being done via a model copy (See https://customerfx.com/article/copying-a-record-from-client-side-code-using-the-model-class-in-a-creatio-freedom-ui-page/) then yes, you can update values, then finally insert the new record that was created from the copy. The article linked shows how to do this.

If this is from the Copy menu on a list, then you'd have to change that to use your own request, then copy, set the values, insert, in your own custom code.

Ryan

If this is being done via a model copy (See https://customerfx.com/article/copying-a-record-from-client-side-code-using-the-model-class-in-a-creatio-freedom-ui-page/) then yes, you can update values, then finally insert the new record that was created from the copy. The article linked shows how to do this.

If this is from the Copy menu on a list, then you'd have to change that to use your own request, then copy, set the values, insert, in your own custom code.

Ryan

Hi Ryan, 

I was just calling the request from the button. Another thing is that if you call it from any page other than [object]_ListPage it’ll open the classic ui page, rather than the freedom UI page. 
I’ll definitely give the approach you described a try, I’m sure it’ll work. 
Thanks a lot!

Show all comments