Friday, April 5, 2019

Salesforce CPQ Lightning Template Content Font Color

Somehow I was involved in trying to change the font color in Salesforce CPQ template content. Seems easy but it is not working the way we want.

We selected HTML as the content type and it comes with a nice rich text editor. As we change the font color, it looks great on the page. However, when we attach the template content to the quote template and preview the quote with that template, couple of things occurs:

  • The font color is gone and reflected back to black
  • It puts the next words which is supposed to be different color in a new line
We double-checked the HTML and can't find anything wrong with it. So I decided to check which engine generates the quote preview PDF and found out that it is using Apache FOP. The fun thing is it Apache FOP doesn't support HTML inherently, but it does support XSL, so

Model Binding Issue ASP.NET Core in Ubuntu using Postman

I spent a fair amount of time trying to troubleshoot my ASP.NET Core web server in Ubuntu. The issue starts when I noticed a failed model binding in Ubuntu using HTTP PUT method when it works locally on my Window machine. I also found out that it binds properly when I used HTTPS compared to HTTP.

Looking into the server, I have configured Nginx as reverse proxy server which send a 301 Redirect to HTTPS when the request is made using HTTP. I can't find any issue on the web application itself, Nginx, so I decided to check Postman which I used to generate the request.

I found out that by default, Postman always follows redirect. There is nothing wrong with that, except seems like the data is lost during redirect. Eventually I found out that, 301 is meant to be used with GET and thus any POST/PUT data will be scrapped during redirect. Hence, it is the correct logic all along.