Skip to content

Commit

Permalink
feat: Count API will get only active counts
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashutosh619-sudo committed Sep 27, 2024
1 parent 603eb0b commit d282a73
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion netsuitesdk/api/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@ def get_all(self):
return all_records

def count(self):
ps = PaginatedSearch(client=self.ns_client, type_name=self.type_name, pageSize=10, perform_search=True)
record_type_search_field = self.ns_client.SearchBooleanField(searchValue=False)
basic_search = self.ns_client.basic_search_factory(
type_name=self.type_name,
isInactive=record_type_search_field,
)

ps = PaginatedSearch(client=self.ns_client, type_name=self.type_name, pageSize=10, perform_search=True,basic_search=basic_search)
return ps.total_records

def get_all_generator(self, page_size=20):
Expand Down

0 comments on commit d282a73

Please sign in to comment.