Skip to main content

I have a standard Salesforce duplicate rule set up.  It’s set to Allow/Alert, which means that the user should see an error when we find a duplicate, but then has the ability to dismiss the error.  Does anyone know what I can do to dismiss the error using Skuid?  the error shows nicely, but I can’t remove it or save the record.  

Bumping this… anyone have ideas?  Alternatively, any ideas about creating my own “duplicate check” widget in Skuid?  It could be pretty basic - could just be exact matching on names.


Hi Elissa, thanks for bringing this issue to our attention.  I hope you and yours are well.

  • Can you send a screenshot for context?

  • What version of Skuid are you using?

  • Are you building in API v1 or v2?


Hi Anna!  a little more detail here: if I check “Roll back entire save on any error” on the Skuid page, the Duplicate Rule error message shows, and then I can’t save the record at all.  If I uncheck that box, then the error message never shows.  



I’m using 12.2.13 and API v1.


Thanks for that, Elissa.  What’s the desired behavior here? It sounds like the user should be able to dismiss the error and then go ahead and save the new record despite it being a duplicate.  Is that correct?


That’s right.  The Salesforce duplicate rule “Action on Create” = Allow … which means that the user should be able to dismiss the “dupe found” error and continue on to save.  Here’s how the duplicate rule is configured: 


  


Here’s how this looks in Classic Salesforce: 



Hi Elissa, thanks for your patience. As you’ve discovered Skuid doesn’t currently support the ability to dismiss allow/alert errors. I will add this as a product enhancement request so our product team is aware of it.


In the meantime there are different ways that you can workaround this behavior on the Skuid page level, use the action framework to check for duplicates and conditionally display a message and a list of possible duplicates (see the sample page XML below).



<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true"><models><model id="NewContact" limit="" query="false" datasource="salesforce" processonclient="true" sobject="Contact" createrowifnonefound="true"> <fields> <field id="FirstName"/> <field id="LastName"/> <field id="NameChecker" uionly="true" displaytype="FORMULA" length="255" ogdisplaytype="TEXT" readonly="true" returntype="TEXT"> <formula>JOIN_TEXT(" ",{{FirstName}},{{LastName}})</formula> </field> </fields> <actions> <action> <actions> <action type="blockUI" message="checking for duplicates..." timeout="1500"/> <action type="activateCondition" model="ContactDuplicateChecker" condition="Name"/> <action type="requeryModel" model="ContactDuplicateChecker" behavior="standard"/> </actions> <events> <event>row.updated</event> </events> <fields> <field>LastName</field> </fields> </action> </actions> <conditions/></model><model id="ContactDuplicateChecker" limit="" query="false" datasource="salesforce" processonclient="true" sobject="Contact" createrowifnonefound="false"> <fields> <field id="Name"/> <field id="FirstName"/> <field id="LastName"/> <field id="AccountId"/> <field id="Account.Name"/> </fields> <actions/> <conditions> <condition type="modelmerge" value="" field="Name" inactive="false" operator="=" model="NewContact" enclosevalueinquotes="true" mergefield="NameChecker" novaluebehavior="deactivate" state="filterableon" name="Name"/> </conditions></model></models><components><grid uniqueid="sk-3qX2-455"> <divisions> <division behavior="flex" minwidth="100px" ratio="1"> <components> <basicfieldeditor showheader="true" showsavecancel="true" showerrorsinline="true" model="NewContact" uniqueid="sk-3lQP-716" mode="edit"> <columns> <column width="100%" uniqueid="sk-3lQP-712"> <sections> <section title="Section A" uniqueid="sk-3lQP-713"> <fields> <field uniqueid="sk-3lQP-717" id="FirstName"/> <field uniqueid="sk-3lQP-718" id="LastName"/> <field uniqueid="sk-3lQP-719" id="NameChecker"> <label>Name Checker</label> </field> </fields> </section> </sections> </column> </columns> </basicfieldeditor> </components> </division> <division behavior="flex" verticalalign="top" minwidth="100px" ratio="1"> <components> <wrapper uniqueid="sk-3lRl-1199"> <components> <wrapper uniqueid="sk-3lS3-1357"> <components> <richtext multiple="true" uniqueid="sk-3lS3-1358" model="ContactDuplicateChecker"> <contents>&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;There are {{Model.data.length}} contacts with the same name&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;</contents> <renderconditions logictype="and"/> </richtext> </components> <styles> <styleitem type="background" bgtype="color"> <styles> <styleitem property="background-color" value="orange"/> </styles> </styleitem> <styleitem type="border" padding="all"> <styles> <styleitem property="padding" value="1em"/> <styleitem property="box-sizing" value="border-box"/> </styles> </styleitem> <styleitem type="size"/> <styleitem property="color" value="white"/> </styles> <renderconditions logictype="and"> <rendercondition type="fieldvalue" enclosevalueinquotes="true" fieldmodel="ContactDuplicateChecker" sourcetype="modelproperty" nosourcerowbehavior="deactivate" sourceproperty="hasRows"/> </renderconditions> </wrapper> <skootable showconditions="true" showsavecancel="false" showerrorsinline="true" searchmethod="server" searchbox="true" showexportbuttons="false" hideheader="false" hidefooter="false" pagesize="10" alwaysresetpagination="false" createrecords="false" model="ContactDuplicateChecker" buttonposition="" mode="readonly" allowcolumnreordering="true" responsive="true" uniqueid="sk-3lQX-799" heading="Potential Duplicates"> <fields> <field id="Name" uniqueid="fi-3lQX-800"/> <field id="AccountId" hideable="true" uniqueid="fi-3lSE-1444"> <label>Account</label> </field> </fields> <rowactions/> <massactions usefirstitemasdefault="true"/> <views> <view type="standard"/> </views> </skootable> </components> <styles> <styleitem type="background" bgtype="none"/> <styleitem type="border"/> <styleitem type="size"/> </styles> <renderconditions logictype="and"> <rendercondition type="fieldvalue" enclosevalueinquotes="true" fieldmodel="ContactDuplicateChecker" sourcetype="modelproperty" nosourcerowbehavior="deactivate" sourceproperty="hasRows"/> </renderconditions> </wrapper> </components> </division> </divisions> <styles> <styleitem type="background" bgtype="none"/> </styles></grid></components><resources> <labels/> <javascript/> <css/> <actionsequences uniqueid="sk-3lPx-429"/></resources><styles> <styleitem type="background" bgtype="none"/></styles></skuidpage>

Thanks so much for tracking this down, Anna!  We’ll give this a shot.


Sweet! You’re welcome 😃


Hi, Have there been any updates to this? Running into the same issue using 13.0.11. Even though “Roll back entire save on any error” is unchecked, my v2 page won’t allow saving a duplicate contact.


Just found my answer for my issue from another Skuid note on Duplicates.


Need to turn off Alerts on the Salesforce Duplicate Rule.


I can now create dupes. FYI I’ve also used the code provided by Anna above to issue a warning of duplicates.


thanks,

~harry


Does Skuid support saving of Duplicates with Alert enabled on Duplicate Rule?


Appears that if alerts are off, then Skuid can save the duplicate record but if the duplicate record is created in Salesforce no notification is provided that record is a duplicate.


Conversely if Duplicate Rule Alert is enabled, Salesforce created duplicate record notification occurs but Skuid cannot save record.


Need to support duplicate record saving with both Skuid & Salseforce. Any ideas?


Reply