• Steave James
  • NEWBIE
  • 0 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies

I am creating a VF page that displays an object and allows searching of the list with Angular.


What I would like to do now is add the capability to filter on a column before searching. For example - A dropdown menu for "Department" that lists the different departments, upon selection the list filters every record with DepartmentA, then search.


How would I go about doing this?


I will eventually integrate this with custom objects, but I am using the Contact object for now until I can figure it out.


Thank you for any help you can provide.

Controller:
 

public with sharing class con_Test {

         public static String getContacts() {
       return JSON.serialize([select id, name, department
           from contact ]);
   }
}
 


VF:

 

apex:page showHeader="false" applyHtmlTag="false" docType="html-5.0" controller="con_Test">  
<head>

   <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"/>
   <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.11/angular.min.js"></script>

   <script>

     var App = angular.module('myApp', []);

     App.controller('myctrl', function ($scope) {   

         $scope.contacts = {!contacts}
     });
   </script>

</head>


 <form class="form-inline">
        <div class="form-group">
            <label >Search: </label>
            <input type="text" ng-model="search" class="form-control" placeholder="Search"></input>
    </div>
</form>

<body ng-app="myApp" class="container" ng-controller="myctrl">
   <table class="table table-bordered">
     <tr>
       <th>Name</th>
       <th>Department</th>
       <th>Id</th>
     </tr>

     <tr ng-repeat="contact in contacts | filter:search">          
       <td>{{contact.Name}}</td>
       <td>{{contact.Department}}</td>
       <td>{{contact.Id}}</td>
     </tr>

   </table>
</body>

</apex:page>
I've been getting dozens of these, what are clearly backend salesforce errors, in the past few hours. They have only happened on two objects so far, both of which have Process Builder flows (if relevent). I was about to open a case with salesforce, but they seemed to have stopped happening. Anyone seen this error before or know if there's a fix?

Line of code executing the DML operation:
List<Database.SaveResult> vehicleSRs = Database.update(vehiclesToUpdate, false);

Example of what is being updated:
**************************************************************************************************
Vehicle failed to update:
Vehicle__c:{Id=a0D37000001iiCNEAY, Location_Coordinates__Latitude__s=49.192546, Location_Coordinates__Longitude__s=-123.981249, Location_Date__c=2016-11-12 16:43:48}
**************************************************************************************************

And the error:
**************************************************************************************************
Error:
(Database.Error[getFields=();getMessage=The record couldn’t be saved because it failed to trigger a flow. Couldn't retrieve the active version of the flow with definition ID null. ORA-06550: line 1, column 13:
PLS-00382: expression is of wrong type
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored


This almost certainly means your PL/SQL is out of sync with your Java. Rebuild and then run ./ant plsql.

SQLException while executing plsql statement: {?=call fInteraction.get_all_definitions_nc(?)}(00D37000000PVDi) Contact your administrator for help.;getStatusCode=CANNOT_EXECUTE_FLOW_TRIGGER;])
**************************************************************************************************