Wednesday, December 21, 2011

What's new in Pivotal CRM 6.0.10?

CDC Software released service pack 10 for Pivotal CRM.

So what's new:

End user features:

  • Drill-down graphs: Users can now double-click on a graph segment to drill-down and get additional information.
  • Tooltips on Graphs.
  • Column personalization support when a Search Results List display is specified: When a search is executed through Client Tasks or through a command with a specified Search Results List display, personalized display for the search is no longer ignored.
  • Optional parameter for Crystal Reports: The optional parameters defined in Crystal Report Designer will now be reflected as optional in the Report Options dialog box while running a report in the Client. Previously these parameters appeared as mandatory in the Report Options dialog box.


Customizers features:

  • Pivotal Visual Workflow 6.0.10.
  • Preselected standard filters: OnStandardFilterLoaded notification was added.
  • Enhancements to Active Search Page: OnSearchResultsListItemClicked notification handler is now fired when a record is clicked on an Active Search Page.
  • External attachment support.
  • Additional Client API to export data in a specified format to a specified destination file: ExportData method.
  • Connector APIs for automated sending of e-mail messages: send e-mail messages automatically without displaying the Outlook inspector window.
  • Additional client-side Connector APIs: Retrieve and Modify.
  • New dialog box for Set Global Options in the Security Business Object.
  • New chart types for Graphs: Line, Column, Doughnut, Point.
  • A Unicode version of the rlangdict.csv file.
  • New fields in E-mail command: To, Cc, Bcc, Subject.
  • Option to open links in a modeless Pivotal Client window.
  • Localization of the Crystal parameter labels.
  • Display open parameters in multiple columns: Open parameters for a search can now be displayed in either a single column or multiple columns.
  • New lightweight SystemProxy proxy class: replacement for PBS XML API.


Administrator features:

  • New user interface with settings to specify form layout display and user authentication during installation.
  • Support for specifying Fully Qualified Domain Name (FQDN) to access ClickOnce deployment servers from different locations.
  • HTTPS support in ClickOnce deployment.
  • Microsoft SQL Server 2008 R2 Native Client support.
  • Improved Pivotal Diagnostics.
  • EMS Inbound Email Address now supports the configuration of the POP3 server port.
  • Enhancements to the Rn1SendX component in Pivotal Business Server to support the configuration of an SMTP port number.
  • SQL Server read-committed snapshot database option.


And of cause, many bugs were fixed.

Thank you,
Max Shafranski

Wednesday, October 26, 2011

CDC Software Pivotal CRM 6.0: How to open window of custom size.

To open forms in popup or modal window we usually use ShowForm method from Foundation Library:

Globals.ShoForm(formOrTableName, recordId, parameterList, actionTargetWindow);


But it opens forms with a default size.
To open forms with the custom size we need to define TargetWindowProperties of the action.

Here is an example:

// Get the instance of ActionService
IActionService actionService = ClientContext.ClientAPIService.GetService();

// Initialize form action target request
IFormActionTarget formActionTarget = actionService.CreateActionTarget();
formActionTarget.Form = "My Form";
formActionTarget.Table = "Support_Incident";            
formActionTarget.RecordId = recordId;
formActionTarget.ParameterList = parameterList;

// Set target window properties
ITargetWindowProperties windowProperties = actionService.CreateNewWindowProperties();
windowProperties.UseDefaultSize = false;
windowProperties.Resizable = true;

// Set the custom window size
windowProperties.Width = 600;
windowProperties.Height = 600;

// Create action to open a popup window
IAction action = actionService.CreateAction(string.Empty, ActionCommand.Show, ActionContent.Record, formActionTarget);
action.TargetWindow = ActionTargetWindow.Popup;
action.TargetWindowProperties = windowProperties;

// Execute action
actionService.ExecuteAction(action);


With the power of Pivotal CRM,
Max Shafranski
:)

Monday, June 27, 2011

Pivotal CRM 6.0.9 is released. What's new?

Good news.

CDC Software released service pack 9 for Pivotal CRM.
Here are the major new features are of Pivotal CRM 6.0.9:

End user features:
  • More flexible and personalizable CRM Task Pane inside Outlook.
  • Default interaction extension for Outlook e-mails, meetings and tasks.
  • Search Standard filter easily identifiable.
  • Improvement in Portal Page Performance.

Customizers features:
  • Microsoft Visual Studio 2010 support and .NET 4
  • New notification OnStandardFilterLoaded is added.
  • A new programming event called the OnBeforeCancelLinks event, has been provided for better programming support with Microsoft Outlook.
  • Support for PIM Client Tasks for e-mail messages.
  • Text wrapping is available for the Search Results List. This can be enabled or disabled by the customizer.
  • Rich text functionality is available for the following: Notes, Search Results Lists, Memo Fields, Primary and Secondary Fields in Forms.
  • Ability to programatically set the Timezone when creating meetings.
  • The maximum number of records returned in the Recipient window is made configurable.
  • Additional Office Integration Server APIs.
  • Client Tasks running inside Outlook do not have to be signed.
  • Pivotal Visual Workflow 6.0.9 (Preview Version)

Administrator features:
  • Support for running multiple distinct applications with multiple Pivotal Business Server instances on the same server.
  • Microsoft Exchange 2010 support.
  • Microsoft SharePoint Server 2010 Standard Edition support.
  • Users can specify the location for the Client Tasks while installing Pivotal Packaged Client.
  • Pivotal Report Driver for Crystal Reports.
  • Custom indexes retained.
  • Visual cue in Pivotal Administration Console to indicate Unicode system.
  • Audit System command available on satellites and mobiles.
  • Changes to the maximum years of expansion for recurring meetings or appointments in Pivotal
  • Synchronization Service for Microsoft Exchange.

Regards,
Max Shafranski

Monday, May 2, 2011

CDC Software Pivotal CRM 6.0: View table fields audit log SQL query.

If a field marked as "Monitor on Log" then any its changes will be save in Pivotal history table.

This SQL script helps Pivotal developers to view a field change log details:

DECLARE
 @Table_Name nvarchar(28),
 @Table_Id binary(8),
 @Record_Id binary(8)

--Set input parameters
SET @Table_Name = 'Support_Incident'
SET @Record_Id = 0x8000000000000088

--Get table ID from BM database
SELECT @Table_Id = Tables_Id FROM PivotalBM.dbo.Tables WHERE Table_Name = @Table_Name

--Select audit entries for the required record from ED database
SELECT
    Journal_History.Field_Label,
    Journal_History.New_Value,
    Journal_History.Time_Stamp,
    Employee.Full_Name AS [Employee_Name]
FROM PivotalED.dbo.Journal_Items
INNER JOIN Journal_Pages ON Journal_Pages.Journal_Pages_Id = Journal_Items.Journal_Pages_Id
INNER JOIN Journal_History ON Journal_History.Journal_Pages_Id = Journal_Pages.Journal_Pages_Id
INNER JOIN Employee ON Journal_History.Rn_Create_User=Employee.Rn_Employee_User_Id
WHERE Journal_Items.Reference_Table = @Table_Id AND Journal_Items.Reference_Record = @Record_Id
ORDER BY Journal_History.Time_Stamp DESC

CRM it is no joke!

Thursday, March 17, 2011

CDC Software Pivotal CRM 6.0: How to change form title programmatically.

It's not easy as I thought.

I need to change a new form title that always set to "New".
And I don't want to change language strings and add parameters like "My new %1"...

FormView.FormTitle is read only property.
Also, FormView class marked as internal class that implements IFormView interface.
So, we can't access directly to to the internal class from another assembly.
But there is a nice solution that always works - Reflection.

 public override void OnFormInitialized()
{
  //Get user defined form title
  string userDefinedFormTitle = Convert.ToString(this.FormControl.WindowsControl.GetType().GetProperty("FormTitle").GetValue(this.FormControl.WindowsControl, null));

            
  //Set new form title
  this.FormView.GetType().GetProperty("FormTitle").SetValue(this.FormView, originalFormTitle, null);
 }


Reflection rules!
Max

Thursday, February 10, 2011

ASP.NET MVC: Disable submit button after click when using Microsoft MVC client validation library.

If you want to disable submit button after it has been clicked you can use this jQuery code:

$("form").bind("submit", function (e) {
   // On submit disable form submit button
   $('input[type=submit]', this).attr('disabled', 'disabled');
});

But if you use MVC client validation

<% Html.EnableClientValidation(); %>

and the form has validation errors, the submit button will be disabled anyway.

So, we need to modify our submit form handler function to check if the form has errors.

$("form").bind("submit", function (e) {
   var mvcValidationContext = e.srcElement['__MVC_FormValidation'];
   if (mvcValidationContext) {
      var formValidationErrorsCount = mvcValidationContext.validate('submit').length;
      if (formValidationErrorsCount == 0) {
         // On submit disable form submit button
         $('input[type=submit]', this).attr('disabled', 'disabled');
      }
   }
});

Thats all.

Sunday, January 2, 2011

CDC Software Pivotal CRM 6.0: How to change rows style in PivotalSearchResultGrid

Here is an example we can access to PivotalSearchResultsGrid rows.
Lets color all rows that contain specific Company_Name value.
First of all we need to add DataBindingComplete event handler to the PivotalSearchResultsGrid control.
To do it we need to override OnFormInitialized method that fires after the form has been drawn and all the data has been loaded and bound:

public override void OnFormInitialized()
{
    PivotalSearchResultsGrid mySearchResultsGrid =   this.FormControl.GetControlByName("CompaniesPivotalSearchResultsGrid") as PivotalSearchResultsGrid;
    if (mySearchResultsGrid != null)
    {
        //Get a grid control from the PivotalSearchResultsGrid
        DataGridView grid = mySearchResultsGrid.ResultsViewControl.Controls[0].Controls[0] as DataGridView;
        //Handle DataBindingComplete event that fires when the content DataSource changed
        grid.d.DataBindingComplete += new DataGridViewBindingCompleteEventHandler(dataGridView1_DataBindingComplete);
    }
}

Than just implement the dataGridView1_DataBindingComplete event handler:

private void dataGridView1_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
{
    DataGridView grid = sender as DataGridView;
    for (int i = 0; i < grid.Rows.Count; i++ )
    {
        DataGridViewRow row = grid.Rows[i];
        //Access to row data
        string companyName = row.Cells["Company_Name"].Value.ToString();
        if (companyName == "Microsoft")
        {
            //Paint row in Blue
            row.DefaultCellStyle.BackColor = Color.Blue;
        }
    }
}

Thats all.
Enjoy with Pivotal 6.0.

Saturday, January 1, 2011

CDC Software Pivotal 6.0: How to prevent to open record on double click in PivotalSearchResultsGrid control.



This is the way to remove an original CellMouseDoubleClick event handler to prevent to open records on double click in PivotalSearchResultsGrid.


Add CdcSoftware.Ios.dll reference to you Client Task project. 
Add DisableSearchResultGridDoubleClick function call in your Client Task in OnFormInitialized handler:


public override void OnFormInitialized()
{
 PivotalSearchResultsGrid clientDetectionSearchResultsGrid = this.FormControl.GetControlByName("ClientDetectionPivotalSearchResultsGrid") as PivotalSearchResultsGrid;
 if (clientDetectionSearchResultsGrid != null)
 {
  DisableSearchResultGridDoubleClick(clientDetectionSearchResultsGrid);
 }
}

private void DisableSearchResultGridDoubleClick(PivotalSearchResultsGrid grid)
{
 if (grid != null)
        {
         FieldInfo eventHandlerInfo = grid.ResultsViewControl.GetType().GetField("CellMouseDoubleClick", BindingFlags.NonPublic | BindingFlags.Instance);
                object oHandler = eventHandlerInfo.GetValue(grid.ResultsViewControl);

                EventHandler<cdcsoftware.iaf.ios.messaging.iafmessageeventargs> eventHandler = oHandler as EventHandler<cdcsoftware.iaf.ios.messaging.iafmessageeventargs>;

                if (eventHandler != null)
                {
                    grid.ResultsViewControl.CellMouseDoubleClick -= eventHandler;
                }
            }
        }
}