Spotfire web player 5.0
Posted By: Doddy.Amijaya on February 22nd, 2014 in Spotfire
No Gravatar

I have done spotfire installation and integrate it with SalesLogix a handful of times now. I ran into some snags here and there. I’d like to share the issue that I ran into recently when installing and integrating Spotfire with SalesLogix.

I have installed the Spotfire server, the fat client, webplayer and the deployment. I also installed the latest hotfix and patch for the server and the application.
For some reason I kept getting the following error in the AJAX request:


System.InvalidOperationException: Spotfire.Dxp.Web.Response cannot be serialized because it does not have a parameterless constructor.
at System.Xml.Serialization.TypeScope.GetTypeDesc(Type type, MemberInfo source, Boolean directReference, Boolean throwOnError)
at System.Xml.Serialization.ModelScope.GetTypeModel(Type type, Boolean directReference)
at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(Type type, XmlRootAttribute root, String defaultNamespace)
at System.Web.Services.Protocols.XmlReturn.GetInitializers(LogicalMethodInfo[] methodInfos)
at System.Web.Services.Protocols.HttpServerType..ctor(Type type)
at System.Web.Services.Protocols.HttpServerProtocol.Initialize()
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)

I thought maybe because I haven’t installed the ASP.NET 2.0 AJAX extension, so I installed that but still no luck.
Next step I undo the custom Java Authentication and Authorization Service (JAAS) and using spotfire db authenticatio instead….
Still not working.


go to C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319
and run this command : aspnet_regiis -i


and it fixes it!!

Updating Time Units in Ticket Activities entity
Posted By: Doddy.Amijaya on February 14th, 2014 in Saleslogix
No Gravatar

Recently I’ve got a request to customize add/edit ticket activities form so that when users click the save button it will auto populate the Completed Date field with the current date and time. The other requirement is the units needs to be rounded up

so that’s easy. I made the changes as requested and it did save the value of the Completed Date. However Unfortunately no matter how long is the duration between assigned date and completed date the time units is always 0. Weird huh?

No matter how I set the Units property when I called .save() it will set it back to 0. I tried using snippet code and on before insert/on after insert Business rules but still no luck. it will always set it to 0.

so this is the work around that I came up with

ticketActivity.CompletedDate = DateTime.Now.AddSeconds(30);
object[] objarray = new object[] { this.BindingSource.Current };
Sage.Platform.EntityFactory.Execute("TicketActivity.DoTicketActivityCalculations", objarray);

Calling the DoTicketActivityCalculations method will set the units and it works perfectly.
I don’t know if everybody but me knew this but thought I’d share.

Formula builder in SugarCRM
Posted By: Doddy.Amijaya on December 4th, 2013 in SugarCRM
No Gravatar

Recently I came across a strange behavior on SugarCRM formula builder.
What I wanted to do is Hide/Show fields based on other field condition.
In studio I checked the Dependent checkbox and I add the condition like so for my Status textbox

equal($stage_complete_c, "true")

My Status text box will be visible if $stage_complete_c = true.
So far so good. The textbox is indeed hidden if the $stage_complete_c = false and will appear when the value = true.
However this only applies to the EditView which is pretty strange.
When I click the save button and I go to DetailView my Status textbox is still hidden eventhough $stage_complete_c value = true.

The solution that I came up with is this

not(equal($stage_complete_c, "false"))

Now my Status text box will appear on both DetailView and EditView when the $stage_complete_c value = true.
Basically it’s doing the same thing and I don’t know why this one work and the other doesn’t

Customizing Line Item in SugarCRM in upgrade safe manner
Posted By: Doddy.Amijaya on October 25th, 2013 in SugarCRM
No Gravatar

I came across this request not too long a go and it did take a while for me to figure out. Now I’d like to share it with you guys hopefully this will save your hours of researching.
I used Aptana as my text editor because I need to reformat the minified Quotes.js

there are 6 files that you have to modify (7 if you would like to customize print to pdf feature as well):
1. Quotes.js (this is where you’d create the line items form)
2. EditView.js (This is to update the value)
3. editviews.php (this is where you would reference the EditViewFooter.tpl)
4. view.edit.php (this is to set the line items value)
5. EditViewFooter.tpl (this is where you reference the Quotes.js)
6. DetailViewFooter.tpl (this is the detail view of line items form)
7. sugarpdf.standard.php (this is to export to pdf)