clone model without cloning parent?

  • 1
  • Question
  • Updated 3 years ago
Page with Model A, Model B.

Model A is first model with Id=id param condition.
Model B is on parent object of Model A, with field from another model condition pointing to the reference field on Model A.

I set only Model A to clone when clone & id parameters are present.

When I load the page with the clone=1 url parameter, Model A's Id = clone_1, as expceted, but Model A's master-detail reference field (call it Model_B__c) = clone_2... (and therefore the Id field of Model B is clone_2).

Unexpected?

I don't want to clone Model B. I want the clone of Model A to be a new child of the same parent...

Thoughts?
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb

Posted 3 years ago

  • 1
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Does the model B have clone option set to "Never"?
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Yes.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Why is Model B second? Especially if it's the parent object to Model A? Did you try moving to the first position?
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Model B has to be second because it uses a field from another value condition which points to Model A...

But I just checked Model B, and it DID have cloning turned on! Perhaps skuid did this automatically when I turned it on for Model A?

Turning it back off and trying again!