Month: May 2014

Salesforce: Pure SOQL way to select record with given date


patlatus

Unfortunately we are not allowed to pass Date values in where clause of pure SOQL (if we don’t call it from code but from Query Editor or during querying schema). SOQL constants like THIS_DAY, THIS_WEEK, LAST_WEEK do not cover all the date constants we could be interested in. So, what solution can we find?
Assume we have custom SObject Custom_Object__c with date field Custom_Date_Field__c.
Then if we need to run pure SOQL query to retrieve all records having in field Custom_Date_Field__c given date constant, let’s say 25 July of 1987, we could run following query:

SELECT Id FROM Custom_Object__c WHERE CALENDAR_YEAR( Custom_Date_Field__c ) = 1987 AND CALENDAR_MONTH( Custom_Date_Field__c ) = 7 AND DAY_IN_MONTH( Custom_Date_Field__c ) = 25.

Hope you liked this.

View original post

Advertisements

Multiple Conditionals in rendered Attribute


scotthung

A VisualForce page can use apex:outputText component’s rendered attribute to display a text block based on different criteria.  In my case, the text block would only display if a field was not empty. For example:

<apex:outputText rendered="{!Download_URL1__c != ''}">
  text block
</apex:outputText>

If you’re familiar with VisualForce dynamic binding then you know this fetches the Download_URL1__c custom field from the object and we check that it’s not blank.

A new requirement arose to display the text block if either this, or a new second field, was not empty.  Turns out, the rendered attribute can be something akin to a formula field.  Once I discovered this, it was straightforward to update the rendered attribute to:

<apex:outputText rendered="{!OR(Download_URL1__c != '',Download_URL2__c != '')}">
  text block
</apex:outputText>

So now, if either Download_URL1__c or Download__URL2__c is not blank then the text block appears.

View original post

Excellent introduction to developing iOS 7 application


David Witherspoon

“iOS 7 in Action” by Brendan Lim and Martin Mac Donell is an outstanding book for anyone wanting to learn more about developing application for iOS devices.  The content of the book is organized really well and the examples are well documented and easy to learn to many areas of the API that they cover.  I have read many books on learning iOS development and really enjoyed this book in the way that they build the examples off of each other and how to take advantage of developing within Xcode.

The layout of the chapters is done really well and you can tell that there was a lot of thought put into it.  If you have not done any development with Objective-C, I would highly recommend reading the Appendix first since that will give you a good idea of how methods and variables work within Objective-C.  Other than that all…

View original post 167 more words

Xcode to IPA file.


My Memory

Step 1:
Go to /Applications right click Xcode.app and click “Show Package Contents”
Step 2:
Go to Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk and copy the file SDKSetting.plist to desktop
Step 3:
Open the copied SDKSettings.plist file. Under <DefaultProperties>-> <dict> find <CODE_SETTING_REQUIRED> and change its value from YES to NO. Save the file.
Step 4:
Copy this modified SDKSetting.plist file back to Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/ replacing the original file [YOU MAY SAVE THE ORIGINAL FILE AS BACKUP]
Do the required AUTHENTICATION AS REQUIRED.
Step 5:
Restart Xcode and your fully runnable xcode project
Step 6:
In Project Navigator select your project and open “Build settings” section of your project and select “All” sub-heading.
Step 7:
Uder Code Signing find “Code Signiung Identity” and for both “Debug” and “Release” modes “setAny iOS SDK” to “Don’t Code Sign”.
Step 8:
In Xcode, goto “Product” and click “Archive”.
Step 9:
Step 7 will build you project and create and Archive.

View original post 99 more words