Change in Model Clone Behaviour

Following option used to work with the clone parameter without the “=anythingyouwanthere” portion.

Used to work URL pre Brooklyn:
https://mblazonry–c.na16.visual.force.com/apex/Journal_Entry_Detail?id=a0fj0000004AMFBAA4&clone

What behavior are you seeing?  I just tried my clone built just a few weeks ago Rockaway and it also is not working in Brooklyn.  I’m not sure what it is doing because I have such a nasty error.  On my clone, I followed the “create a custom clone page” tutorial then added a page load snippet to wipe out a couple fields I didn’t want cloned, because the user needs to fill those out again, so they had to be included in the model.

My page load snippet isn’t even working because the fields are populated with the source record values.  And when I save the clone record, I get a trigger error that runs on record insert on one of my child objects saying it can’t select more than 2000 rows. My child in this case only has 4 rows, but it doesn’t seem to be making the association back to the parent record anymore.

The models load without cloning.

Was there a resolution to this? We are seeing this issue:

From an existing record we send users to a create clone page via this url redreict:
/apex/skuid__UI?page=AFL_Case_Clone&clone=1&Id={{Id}}

The model is using the Yes, if ‘clone’ condition.

The model loads without cloning. Existing record is updated rather than new cloned record being created.

Looks like the id parameter in the URL has the i in id capitalized. Making it lower case should correct it.

Thanks, Pat - I fixed that.

Both Clone pages I’ve tested are still broken in Brooklyn 9.3.1.  Pat - did you get yours working?  My clone record won’t save.  It’s showing the clone_1 placeholder ID.  On save action (tried both declarative and via snippet) nothing happens.  My snippet save gives me a success message {callback: function(result){ if (result.totalsuccess) {   But the ID never gets created on the new record.

So we could still use some help from the Skuid folks on this one.

Amy - is this in the works with the developers?

Well look at that… mine isn’t working any longer. You can start to feel a little less crazy now. :wink: I’m on 9.3.1 as well.

yay?  haha

Chandra and Pat,

Can you guys give some more details about your setup? I’m able to create a basic clone page for an account and its opportunities, and I can watch, as I save, that the id changes from clone x to a proper id (though I have only tried this declaratively and not in a snippet). 

Here’s the XML of my clone page, if you guys wanna check and let me know if it works or not (you’ll have to preview the page and then add the &clone=1 parameter and refresh, though I tested with a redirect and it worked):

Account Opps Opps Opps 



Sorry this is still proving problematic!
Amy

Oops, here’s the XML:

<skuidpage unsavedchangeswarning="yes" personalizationmode="server" useviewportmeta="true" showsidebar="true" showheader="true" tabtooverride="Account"> <models> <model id="Account" limit="1" query="true" createrowifnonefound="false" datasource="salesforce" sobject="Account" type="" doclone=""> <fields> <field id="Name"/> <field id="CreatedDate"/> <field id="ParentId"/> <field id="Parent.Name"/> <field id="Id"/> <field id="AccountNumber"/> <field id="Industry"/><field id="AnnualRevenue"/></fields> <conditions> <condition type="param" value="id" field="Id" operator="=" enclosevalueinquotes="true" novaluebehavior=""/> </conditions> <actions/> </model> <model id="Opps" limit="20" query="true" createrowifnonefound="false" datasource="salesforce" type="" sobject="Opportunity" doclone=""> <fields> <field id="AccountId"/> <field id="Account.Name"/> <field id="Name"/> <field id="StageName"/> <field id="CloseDate"/> <field id="Id"/></fields> <conditions> <condition type="modelmerge" value="" field="AccountId" operator="=" model="Account" enclosevalueinquotes="true" mergefield="Id" novaluebehavior="noquery"/> </conditions> <actions/> </model> </models> <components> <pagetitle model="Account" uniqueid="sk-3vFRK-89"> <maintitle> <template>{{Name}}</template> </maintitle> <subtitle> <template>{{Model.label}}</template> </subtitle> <actions> <action type="save" label="Save Account" window="self"> <actions> <action type="save"> <models> <model>Account</model> </models> </action> </actions> </action> <action type="save" label="Save Opps" window="self"> <actions> <action type="save"> <models> <model>Opps</model> </models> </action> </actions> <models><model>Opps</model></models></action> <action type="save" label="Save All" window="self"><actions/><models> <model>Opps</model></models></action></actions> </pagetitle> <basicfieldeditor showsavecancel="false" showheader="true" model="Account" mode="edit" uniqueid="sk-3vFRK-90" buttonposition="" layout="above"> <columns> <column width="50%"> <sections> <section title="Basics" collapsible="no"> <fields> <field id="Name"/> <field id="ParentId" valuehalign="" type=""/> <field id="Industry"/><field id="AnnualRevenue"/></fields> </section> </sections> </column> <column width="50%"> <sections> <section title="System Info"> <fields> <field id="Id" valuehalign="" type=""/> </fields> </section> </sections> </column> </columns> </basicfieldeditor> <skootable showconditions="true" showsavecancel="false" showerrorsinline="true" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="true" model="Opps" buttonposition="" mode="edit" allowcolumnreordering="true" uniqueid="sk-43yUO-178"> <fields> <field id="Name" hideable="true" uniqueid="fi-43-fM-192"/> <field id="StageName" hideable="true" uniqueid="fi-43-fN-193"/> <field id="CloseDate" hideable="true" uniqueid="fi-4Fbau-133" valuehalign="" type=""/> <field id="AccountId" hideable="true" uniqueid="fi-43-fO-194"/> <field id="Id" hideable="true" uniqueid="fi-2JQSEi-260"/></fields> <rowactions> <action type="edit"/> <action type="delete"/> </rowactions> <massactions usefirstitemasdefault="true"> <action type="massupdate"/> <action type="massdelete"/> </massactions> <views> <view type="standard"/> </views> </skootable> </components> <resources> <labels/> <css/> <javascript/> </resources> <styles> <styleitem type="background" bgtype="none"/> </styles> <pageregioncontents xmlns="http://www.w3.org/1999/xhtml"> </pageregioncontents></skuidpage>

er … uh … my bad. Had a validation rule issue on cloning the record. Cloning works for me. :confused:

hehehe … you may be going back to feeling a little crazy. My cloning is working. Had a validation rule issue. :confused:

Amy - I have 2 custom objects, Quote and Quote Products. My Quote object is the parent and the source of the clone. It appears to be cloning, and I get a temp ID of clone_1 until the record saves, and then it gets a real ID.

My quote products has the model set to Quote = (field from another model … Id from Quote model) but it is getting the source ID populated and never updates.

2015-150102 is the source record that was cloned and shouldn’t be showing in my quote products table (below the red error message)
Record ID a0FA000000KHZf1MAH is the new id that was generated after Quote was saved. The Quote product save fails with the ugly message. But I can see from the beginning that the children records are not getting the ID passed from the parent.

Child model:

I do have the quote (parent) lookup field included in my quote products object. This was working on Rockaway - stopped working on Brooklyn.

While my example able is on a Clone of a parent + children, we also see it on a simpler clone page that is only cloning a parent record, a custom Case object we are using.

Model is set to Clone Yes, always.

I see the clone_1 ID when the clone starts.  On save, the clone_1 ID changes to a real (new) ID.  But when you look at the new detail of the ID generated, all fields are blank.  None of the cloning happened.

This is a production issue for us… so we’d love some help.

Chandra,

Would you mind upgrading to Brooklyn Iteration 3 (located at Skuid’s releases page) to see if it fixes your cloning problem? I’m not sure if it will or not, but it fixed Tami’s problems and I was on Iteration 3 when I couldn’t reproduce your problem.

As a reminder, Salesforce does not allow reverting back to prior versions of managed packages. Skuid always recommends installing new versions in a non-business critical sandbox environment to test all mission critical functionality before installing into a production environment. We also recommend that you update out of date themes when you upgrade.

Thanks!
Amy

OK - both my broken clone pages are working in my sandbox on 9.3.3.  Thanks so much.