Category Archives: Technical

Platform App Builder Certification Maintenance (Winter ’19)

Which behavior is true when using the ‘Deploy processes and flows as active’ feature?

A. Apex tests must cover 75% of all active Processes and autolaunched Flows.

How should an App Builder ensure that Users are able to see Survey responses?

C. Grant access to the Survey object then direct users to the Survey Invitations related list

How can a user share the contents of a Salesforce Folder with customers in Lightning?

B. Create a public link to a Shared Folder.

How can an App Builder configure a Guided Action to be mandatory on a record?

CSet the Is Mandatory field in a Process that launches the Flow.

Platform Developer I Certification Maintenance (Winter ’19) Work with the Lightning Map Component and Apex Inherited Sharing

TowerMapUtilClass.apxc

public inherited sharing class TowerMapUtilClass {
public static List queryObjects(String theObject, List theFields, String theFilter, String sortField, String sortOrder) {
String theQuery = ‘SELECT ‘ + string.join(theFields, ‘,’);
theQuery += ‘ FROM ‘ + theObject;
if(!String.isEmpty(theFilter)) {
theQuery += ‘ WHERE ‘ + theFilter;
}
if(!String.isEmpty(sortField)) {
theQuery += ‘ ORDER BY ‘ + sortField;
if(!String.isEmpty(sortOrder)) {
theQuery += ‘ ‘ + sortOrder;
}
}
return database.query(theQuery);
}
}

TowerMapControllerClass.apxc

public inherited sharing class TowerMapControllerClass {
@AuraEnabled
public static List getAllTowers() {
String theObject = ‘Tower__c’;
List theFields = new List{‘Id’, ‘Name’, ‘State__r.Name’, ‘Tower_Location__Latitude__s’, ‘Tower_Location__Longitude__s’};
String theFilter = ”;
String sortField = ‘Name’;
String sortOrder = ‘ASC’;
List allTowers = TowerMapUtilClass.queryObjects(theObject, theFields, theFilter, sortField, sortOrder);
return allTowers;
}
}

Towermap.cmp

Platform Developer I Certification Maintenance (Winter ’19)

Which method of the DescribeSObjectResult class allows you to access record types by their developer name?

D. getRecordTypeInfosByDeveloperName()

Which Apex class includes new methods to verify digital and HMAC signatures?

B. System.Crypto

Your org has My Domain enabled. What is the most efficient method to obtain a valid session ID to make an HTTP callout from asynchronous Apex code to Salesforce APIs?

B. Use System.UserInfo.getSessionId().

Which annotation allows a developer to make the result of an Apex method storable for Lightning components?

D. @AuraEnabled(cacheable=true)

Which merge field allows you to isolate untrusted third-party content with <apex:iframe> tag in Visualforce?

C. $IFrameResource

Prior to installing an unlocked package, which object should a developer query using the Tooling API to list the packages it depends on?

D. SubscriberPackageVersion

Lightning Flow (Cloud Flow Designer) – Applying a CSS

Lightning Flow provides declarative process automation for every Salesforce app, experience, and portal with two point-and-click automation tools: Process Builder and Cloud Flow Designer.

Cloud Flow Designer allow you to configure screens and conditions and branch that along based on the users input.

Continue reading Lightning Flow (Cloud Flow Designer) – Applying a CSS

Loading JQuery Globally for Sharepoint Online

The pain in customizing Sharepoint Online is real! cheapest viagra sale how much cialis cialis for sale usa

But Jquery can make it so much easier. viagra new zealand buy online generic viagra for sale

To do so, have Sharepoint Designer ready, browse to the master page that you are using. tadalafil low price cheap cialis cialis 5mg daily price

Add the following into your masterpage. viagra da 20 mg when should you take a viagra pill

<!–SPM:–> buy cialis rate generic viagra buy viagra online in india

The above code will load the jquery globally on the masterpage and you dont have to deal with making sure it reference everytime or in JS files.

Sharepoint Online – Office 365 Branding (Top Navigation Bar)

As more and more enterprise are embracing Cloud and Office 365, I thought that this will be a great time to start writing up on branding your Sharepoint Online, which comes part of the package with Office 365.

Sharepoint Online comes configured with the Top Navigation Bar for you.  But we want to hide it, as i dont have all the Sites that I created to be shown in that portion.

O365-SP Online - Top Navigation
Use the following .css to hide the “HR” and “Search”.


.ms-breadcrumb-top  {
display: none;
}

You can add the following the master page or add this to a content editor webpart.

Change a specific K2 smartforms View background colour

Recently, I was asked this question on how to change the background colour of a specific View in a K2 smartforms Form. Like the following:

Change specific View background colour
Change specific View background colour

How to change a specific K2 smartforms View backgound colour

I’ve done some research and testing, and here is the CSS that will do the trick:

The number 2 in the line “nth-of-type(2)”, means the 2nd View in the Form. So if you need to just highlight the 3rd View, change the value to 3 and you are done.

Where to put this piece of style?

If you have a custom Theme and you want all Forms using this Theme to have the same effect, then you should add this style to your Theme’s CSS file.

If you only have to  make the change on a specific form, you can use a hidden Data Label to apply the theme. This is how to do it:

  1. Add a Data Label to your Form.

    Step 1 - Add Data Label
    Step 1 – Add Data Label
  2. Add the following line to the Text property. Remember to update the row number.

  3. Uncheck the Visible property. We don’t need the user to see this value.

    Step 3 - Uncheck Visibile
    Step 3 – Uncheck Visibile
  4. Check the Literal property. We need the control to parse the style tag.

    Step 4 - Check the Literal property
    Step 4 – Check the Literal property
  5. Finish the Form and you are done.

 

So that’s how you change a specific K2 smartforms View background colour.

Have Fun!

K2 Exchange OOFSettings

I’ve just posted K2 Exchange OOFSettings service broker at K2 Community site. This broker uses the EWS Managed API to access the Out-of-Office information on the Exchange server.

Where to get the broker?

The broker can be downloaded from:

Limitations of the K2 Exchange OOFSettings broker

This is the list of limitations of this broker:

  • Since the EWS API requires the user’s login name and password to execute the web service, the broker needs to run under SSO authentication mode. The selected authentication mode must be an AD security provider.
  • The email address will be retrieved via the System.DirectoryService.AccountManagement API, so make sure the user has a valid email address in AD.
  • When UseAutoDiscover service key is set to true, the broker will make use of the user’s email address to auto discover the Exchange server’s URL. See the following link on how to configure auto discover service for Exchange. https://technet.microsoft.com/en-SG/library/bb201695(v=exchg.141).aspx.

Service Instance Setup

As the broker requires the user’s login name and password to execute the EWS call, the service instance must be set up to use SSO Authentication Method and and AD security provider (by default, K2) must be selected.

SSO Authentication Mode
SSO Authentication Mode

The following are the description for the service keys:

Service Keys
Service Keys

  • UseAutoDiscover – Whether to lookup the URL using the Auto Discover service.
  • RequireHTTPS – Whether to enforce that the Exchange server’s URL needs to use the HTTPS scheme.
  • EwsURLFallback – The Exchange server’s EWS URL to be used when the broker fails to get a valid response from the Auto Discover service or when the UseAutoDiscover key is set to false.

Available Methods in K2 Exchange OOFSettings broker

This is the list of methods available:

Get OOF Settings

This method grabs the current selected user’s out of office settings from the Exchange server.

K2 Exchange OOFSettings - Get OOF Settings method
Get OOF Settings method

Turn On OOF Notification with Schedule

This method allows the user to turn on the out of office notification, set the reply email content and most importantly set the start and end date/time.

K2 Exchange OOFSettings - Turn On OOF Notification with Schedule
Turn On OOF Notification with Schedule

Turn On OOF Notification Permanently

Well, this method is the same as the previous one, except that there is no start and end date/time defined. It will be turned on as long as required.

K2 Exchange OOFSettings - Turn On OOF Notification Pernament
Turn On OOF Notification Permanent

Turn Off OOF Notification

This method will turn off the out of office notification.

K2 Exchange OOFSettings - Turn Off OOF Notification
Turn Off OOF Notification

 

Have Fun!