Before building Salesforce into the multibillion-dollar cloud computing behemoth it is today, founder and CEO Marc Benioff experienced his share of ups and downs.
One of the most challenging among them came early on, when the company was just a couple of years old, he said during a recent interview for LinkedIn's "Hello Monday" podcast.
But it also turned out to be one of his most formative, and can provide lessons for business leaders today, he said.
At the time, it was the early 2000s. The economy was in recession and Salesforce, not yet then profitable, was "not stable," the 56-year-old recalled.
Short of a chief financial officer and with little money available, Benioff and his co-founder, Parker Harris, were faced with a difficult decision: Let go of 20% of their workforce or risk losing the company.
Then with a team of 100, that meant saying goodbye to 20 people.
That was a "hard moment," Benioff recalled. But with his long-term vision for the company in mind, Benioff said he was left with little choice.
"We had to take this aggressive action, Parker was in tears, it was like, really upsetting, but we had to do it," he said. "That's business. You have to make tough decisions, you have to evolve, you have to change."
Ultimately, that move saved the business, he said. Three months later, Salesforce was profitable, according to Benioff. And by 2002-2003, things were looking "pretty good."
In 2004, with around $100 million in revenue, the company went public, five years after its founding.
But the entrepreneur said that early experience has stayed with him and continues to guide his decisions today.
"There are moments for every company where you're going to have to look at where you are, what's working, what's not working, you're going to have to make adjustments, you're going to have to change."
That means adopting one of two mindsets, he said: A fixed mindset or a growth mindset.
"Another way to say it is you can have an expert's mind, where you have few possibilities, or you can have a beginner's mind, where you always have every possibility," he said.
"It's critical for every entrepreneur, for every CEO, every business leader — really everyone — [to] maintain your beginner's mind."
To help with that, Benioff said he takes time to focus on mindfulness, which he does via meditation.
"I'm trying to let go of whatever it is so I can be in my present moment reality. That's where I want to be, I want to be in the present moment and having a beginner's mind," he said.
Like this story? Subscribe to CNBC Make It on YouTube!