No validation error while saving multiple records with duplicate values on unique fields

  • 1
  • Problem
  • Updated 4 years ago
  • Acknowledged
  • (Edited)
We have a skuid table base on model Processes (model of custom object Process__c). And we have row action of type popup on process records which has 3 tabs, first tab has field editor (based on Processes model) to edit process records; second tab contains table based on ProcessSteps model (model based on Process_Step__c object which is junction object between Process__c and Step__c). The table on this second tab captures process steps for the process record in context.  Process_Step__c has unique field (External Id field) Code__c (labelled Process Step Code).  While trying to add Process Step records with unique code (good data) it works well. While trying to add Process Step records with one record having duplicate code it gives validation error saying ' Duplicate value on record:  (Related field: Code)' which is expected. However if you add multiple process step records with duplicate Code__c value it does not throw validation error but keeps idling.  Looking at console on gives an Javascript error which I have attached below. 

One record having duplicate code



Multiple records having duplicate code




data object seen on above screen shot after formatting us json formatter

{      "rollbackOnAnyError":true,
    "operations":[  
        {  
            "id":"ProcessSteps",
            "changes":{  
                "2":{  
                    "pfdev1__Process__c":"a0O9000000HkSpAEAV",
                    "pfdev1__Step__c":"a0a9000000H5DibAAF",
                    "pfdev1__Code__c":"11",
                    "pfdev1__Order__c":66
                },
                "3":{  
                    "pfdev1__Process__c":"a0O9000000HkSpAEAV",
                    "pfdev1__Step__c":"a0a9000000H5DibAAF",
                    "pfdev1__Code__c":"11",
                    "pfdev1__Order__c":65
                }
            },
            "updates":[  
                {  
                    "id":"pfdev1__Code__c",
                    "targetObjects":null
                },
                {  
                    "id":"pfdev1__Order__c",
                    "targetObjects":null
                },
                {  
                    "id":"pfdev1__Process__c",
                    "targetObjects":null
                },
                {  
                    "id":"pfdev1__Process__r.Name",
                    "targetObjects":null
                },
                {  
                    "id":"Name",
                    "targetObjects":null
                },
                {  
                    "id":"pfdev1__Step__c",
                    "targetObjects":null
                },
                {  
                    "id":"pfdev1__Step__r.Name",
                    "targetObjects":null
                },
                {  
                    "id":"pfdev1__Subject__c",
                    "targetObjects":null
                },
                {  
                    "id":"pfdev1__Team_Member__c",
                    "targetObjects":null
                },
                {  
                    "id":"pfdev1__Team_Member__r.Name",
                    "targetObjects":null
                },
                {  
                    "id":"pfdev1__Step__r.pfdev1__Subject__c",
                    "targetObjects":null
                },
                {  
                    "id":"pfdev1__Stage__c",
                    "targetObjects":null
                },
                {  
                    "id":"pfdev1__Stage__r.Name",
                    "targetObjects":null
                },
                {  
                    "id":"pfdev1__Active__c",
                    "targetObjects":null
                },
                {  
                    "id":"pfdev1__Locked__c",
                    "targetObjects":null
                }
            ],
            "type":"pfdev1__Process_Step__c"
        }
    ]
}

Any ideas? 

Cheers!
Photo of Gyan

Gyan

  • 1,400 Points 1k badge 2x thumb

Posted 4 years ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
This is a Skuid bug. It will be fixed in Superbank Patch 8.