• c_jonas
  • NEWBIE
  • 5 Points
  • Member since 2015
  • architect
  • Callaway Cloud Consulting

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
If the reocrd is not share with user then when queried using filter on custom field it doesn't return record. But when queried using Id filter or contentdocumentId filter then it return the record.
I have a custom external Id field Unique_Key_String__c' which I'm using in query
Below query doesn't work
Select id,Unique_Key_String__c,Origin,PublishStatus,SharingOption,SharingPrivacy from contentversion where Unique_Key_String__c= '0683C000000K9Mr;cv'
Below query works
Select id,Unique_Key_String__c,Origin,PublishStatus,SharingOption,SharingPrivacy from contentversion where id = '0683C000000K9Mr'

this happens only when record is not shared with current user

I was wondering if anybody has any experience with doing Test-Drive Development (TDD) with apex? I've started experimenting on my own but was curious to know if people have developed some TDD practices specific to Salesforce.

 

For instance, TDD's point is to write the tests before writing any code, but Salesforce statically typed language doesn't allow to write some code that calls a class or method that doesn't exist yet. Should one write a class stub just to be able to save the test code? Something else?

i am having trouble finding examples to test something like this...

 

	 	if ( searchStr.length() < 2 ) {
	 		ApexPages.addMessage( new ApexPages.Message(
	 			ApexPages.Severity.INFO, 'Search requires more characters'));
	 		return null;
	 	}

 

thank you.