Thursday, December 20, 2018

GitHub–Steps to merge a fork to its parent

3 simple steps: (this assumes you have setup a remote branch called upstream that points at the original repo)

  1. git fetch upstream
  2. git checkout master
  3. git merge upstream/master

And to setup a remote called upstream that points at the original repo:

git remote add upstream {url to the original repo}

for more info see: https://help.github.com/articles/syncing-a-fork/

Tuesday, December 18, 2018

Adding the Knowledge Base Search to the “Social Pane”

On the Case entity, the KB search is embedded as part of the Social Pane:

image

Now on a custom entity, after you have enabled it for Knowledge Management (done via Settings >> Service Management >> Embedded Knowledge Search), you have to add the KB control on to the form:

image

image

But, what if you wanted to add make it look like the Case entity, where the KB Search is part of the Social Pane? The “KB Search” tab does not show up as part of the properties of the Activities Tab.

image

The only way I have found to get it on the form is to manually edit the FormXML so that it shows up and then edit it via the form editor.

Here are the steps:

  1. Make sure you have the activities/social pane control on your form (if not, add it – its called the Time Line control).
  2. Give it a unique name (i called it “Timeline_1234”)
    image
  3. Create a new solution and add the entity to the solution.
  4. In the next screen, make sure you select only the form in question and uncheck “Include entity metadata” and “add all assets”
    image
  5. Dont include any required components (on the next screen).
  6. Export the solution as an unmanaged solution.
  7. Unzip the solution and open the “customizations.xml” file.
  8. Search for the control name (in this case it was “Timeline_1234”)
  9. It should look like this:

    <parameters>
         <UClientUniqueName>Timeline_1234</UClientUniqueName>
         <UClientModules>Activities,Notes</UClientModules>
         <UClientDefaultModuleForCreateExperience>Notes</UClientDefaultModuleForCreateExperience>
         <UClientShowFilterPane>true</UClientShowFilterPane>
         <UClientExpandFilterPane>false</UClientExpandFilterPane>
         <UClientOrderBy>descending</UClientOrderBy>
         <UClientRecordPerPage>10</UClientRecordPerPage>
         <UClientSortActivitiesByValue>modifiedon</UClientSortActivitiesByValue>
         <UClientDisplayActivityHeaderUsing>defaultformat</UClientDisplayActivityHeaderUsing>
         <UClientCreateActivityUsing>quickcreateform</UClientCreateActivityUsing>
         <UClientDisplayActivityUsing>defaultfields</UClientDisplayActivityUsing>
         <DefaultTabId>ActivitiesTab</DefaultTabId>
         <OrderByActivityWall>descending</OrderByActivityWall>
         <SortActivityWall>modifiedon</SortActivityWall>
         <EmailConversationView>true</EmailConversationView>
         <ShowArticleTab>false</ShowArticleTab>
         <SelectDefaultLanguage>00000000-0000-0000-0000-000000000000</SelectDefaultLanguage>
    </parameters>

  10. Update: ShowArticleTab to true
  11. Add the following:
    <FilterResults>3</FilterResults>
    <AllowChangingFiltersOnUI>false</AllowChangingFiltersOnUI>
    <ShowLanguageFilter>false</ShowLanguageFilter>
    <ShowDepartmentFilter>false</ShowDepartmentFilter>
    <EnableAutoSuggestions>false</EnableAutoSuggestions>
    <NumberOfResults>4</NumberOfResults>
  12. It should look like this:

    <parameters>
         <UClientUniqueName>Timeline_1234</UClientUniqueName>
         <UClientModules>Activities,Notes</UClientModules>
         <UClientDefaultModuleForCreateExperience>Notes</UClientDefaultModuleForCreateExperience>
         <UClientShowFilterPane>true</UClientShowFilterPane>
         <UClientExpandFilterPane>false</UClientExpandFilterPane>
         <UClientOrderBy>descending</UClientOrderBy>
         <UClientRecordPerPage>10</UClientRecordPerPage>
         <UClientSortActivitiesByValue>modifiedon</UClientSortActivitiesByValue>
         <UClientDisplayActivityHeaderUsing>defaultformat</UClientDisplayActivityHeaderUsing>
         <UClientCreateActivityUsing>quickcreateform</UClientCreateActivityUsing>
         <UClientDisplayActivityUsing>defaultfields</UClientDisplayActivityUsing>
         <DefaultTabId>ActivitiesTab</DefaultTabId>
         <OrderByActivityWall>descending</OrderByActivityWall>
         <SortActivityWall>modifiedon</SortActivityWall>
         <EmailConversationView>true</EmailConversationView>
         <ShowArticleTab>true</ShowArticleTab>
         <SelectDefaultLanguage>00000000-0000-0000-0000-000000000000</SelectDefaultLanguage>
         <FilterResults>3</FilterResults>
         <AllowChangingFiltersOnUI>false</AllowChangingFiltersOnUI>
         <ShowLanguageFilter>false</ShowLanguageFilter>
         <ShowDepartmentFilter>false</ShowDepartmentFilter>
         <EnableAutoSuggestions>false</EnableAutoSuggestions>
         <NumberOfResults>4</NumberOfResults>

    </parameters>

  13. Zip the files back up together.
  14. Import the solution and publish it.
  15. Open the form up in Form Editor and open the properties for the activities control.
    You should be able to set the properties for the KB search now:
    image