Model filter is being completely ignored

  • 1
  • Problem
  • Updated 3 years ago
  • In Progress
I have a very simple filter condition on my opportunity model and it is being completely ignored.



It seems this filter is not being applied at all.  When I preview my page, all records are returned regardless of Record Type.
Photo of Steve Chilcoat

Steve Chilcoat

  • 522 Points 500 badge 2x thumb

Posted 3 years ago

  • 1
Photo of Jack Sanford

Jack Sanford, Champion

  • 8,322 Points 5k badge 2x thumb
Not sure if this is the issue, but it looks like you've got an 18-digit ID there, I've usually used the 15 digit ID. Try removing AAK from the end and see if it works?
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
First guess would be that you didn't add the RecordTypeId field to your opportunity model. If so, the model is not brining in the RecordTypeID field, so there is nothing for the condition to compare against.
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,490 Points 10k badge 2x thumb
Another thing to check is if your user has field level security access to the RecordTypeId field on the Opportunity Object. For security reasons, Skuid doesn't run conditions on fields that the user does not have read access to. 
Photo of Steve Chilcoat

Steve Chilcoat

  • 522 Points 500 badge 2x thumb
I tried the above solutions today and still no luck.  I also confirmed that I have full visibility to the field (I am the salesforce administrator).  
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,490 Points 10k badge 2x thumb
Ok, we'll have to get a bit more advanced to figure this out.

Step 1 (Somewhat Advanced): Can you check post the XML that is created for the model and post it here? There are some cases where this XML can get messed up and not be in sync with what the builder says.

Step 2 (More Advanced): Open up your javascript console, and type the following commands.

Command1:
skuid.model.getModel('MyModelName').soql;

Command2:
skuid.model.getModel('MyModelName').conditions;

If you can, post the results of these commands, maybe we can get to the bottom of this. You'll have to replace MyModelName with the case-sensitive name of your model. For Command2, I'm mostly interested in the properties of the condition in question. You may have to click a little "expand" arrow to see those properties.
Photo of Josh Merritt

Josh Merritt

  • 918 Points 500 badge 2x thumb
I didn't see anyone else suggest it, but if you've applied any logic to your conditions, you have to manually add any new conditions to the logic. You can see this by selecting the "Conditions" on the model.