Clone page not cloning line item ?

  • 2
  • Question
  • Updated 2 years ago
I have Estimate and EstimateLine Objects. EstimateLine is a child and Estimate is a parent. "Estimate__c" is a look-up to Estimate object.  
                 Whenever I clone the page, it will clone Estimate but show  error on EstimateLine "'' error on qeury: Select group, name, ......  from EstimateLine  .where (Estimate__c ='clone_1')''''  , invalid Id field 'clone_1' .
 
I have a condition in estimateLineModel " EstimateLine records where Estimate__c is a id  field from the first row returned from EstimateModel"

My clone button action  url :  "/apex/EstimateDetail?id={{Id}}&clone=1"

I don;t know why its grabbing 'clone_1' instead of actual Id ?
Photo of Amish Ranjit

Amish Ranjit

  • 260 Points 250 badge 2x thumb

Posted 2 years ago

  • 2
Photo of Jannik Gysi

Jannik Gysi

  • 594 Points 500 badge 2x thumb
Hi Amish

On your models, how is the property 'Clone data returned by Model query' set up? Because when your query returns cloned records, you get id's like clone_1, clone_2, clone_3 and so on...
Photo of Amish Ranjit

Amish Ranjit

  • 260 Points 250 badge 2x thumb
This is how I set up...We didn't have any issue before but once we pushed the package we are having this issue....
Photo of Jannik Gysi

Jannik Gysi

  • 594 Points 500 badge 2x thumb
Hmm... I'm not able to reproduce that error....
  • Do both models have the same properties there?
  • Which version of Skuid are you using?
Since the Estimate is cloned correctly, I assume that the id in the url is correct. So you could try to set the condition of the LineItem model to the url parameter as well.
Photo of Amish Ranjit

Amish Ranjit

  • 260 Points 250 badge 2x thumb
Yes,
    But when i do this, It will not copy line-items to new Estimate record, instead it will add a copy to the old estimate record.
(Edited)
Photo of Tami Lust

Tami Lust

  • 5,280 Points 5k badge 2x thumb
Amish,

Did you ever get a resolution to this?
Photo of Amish Ranjit

Amish Ranjit

  • 260 Points 250 badge 2x thumb
Tami,
     I had this cloning issue with old version (Rockaway). It got fixed somehow a while back. I hear the new version of skuid (Brooklyn) is also having the similar issue. 
Photo of Tami Lust

Tami Lust

  • 5,280 Points 5k badge 2x thumb
Amish,

Thanks for getting back to me. Yes, I am having this same issue in Brooklyn. Hopefully, they get this fixed soon.
Photo of Amish Ranjit

Amish Ranjit

  • 260 Points 250 badge 2x thumb
Tami,
           Ur welcome !  Hopefully they  fix all the errors in this Brooklyn version. Brooklyn version has  lots of extra features and its pretty cool, but on the other side, it also has lots of errors !