Question: For the following String creation within a trigger, I'm checking to see if the field is blank. If not, then it should use that field's value as the correct string, else, it should remain blank.

```
String sitenprodcomb = (String.isNotBlank(line.Site__c) ? line.Site__c : '') + String.valueof(line.ProductId__c);

```

However, I'm getting the String exception described in the title when I try to adjust the status of an object using this trigger, I get the error described in the title. 

[![enter image description here](https://i.stack.imgur.com/QQZsY.png)](https://i.stack.imgur.com/QQZsY.png)

Line 272 simply invokes the function that houses this string. The data is being moved into this function correctly. What alternatives do you suggest for setting this String to the correct value?

Answer: 
See this:

[Can I remove the required Close Date field in a new Opportunity?](http://help.salesforce.com/HTViewSolution?id=000004357&language=en_US)

> 
> The standard "Close Date" field cannot be removed from any Opportunity
>  Page Layout, nor can the "Required" property be removed. You can check
>  which fields cannot be removed by going to the "edit" page of your
>  Opportunity page layout (using Enhanced Page Layout Editor), where
>  you'll see the fields denoted by a blue dot. You can also hover over
>  each and it will read "Always on layout."
> 
> 
>
I have a solution for this for now, I have created VF page where I am not showing close date then with the extension I am populating this fields and on save I am displaying the close date.