function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SONAL GSONAL G 

I got stuck in the salesforce limits

I am trying for following scenario,
I am having VF page where user can select upto 500 products and for each product can select upto 71 states. When user selects any product or state I am iteraing data ,performing some calculations and showing to user instantly, after that all data I am storing in the wrapper class (memory), and when user click on save button only that time I am serialising wrapper class data and storing into database.

But when user selects 200 products with each 71 states it's throwing CPU limit exceeded error while adding to wrapper class!!
Also I tried to stored 100 products with 71 states for each product mannually to database just to check it accepts or not ?? it gave me STRING_TOO_LONG, Object Json: data value too large:  error !!

So I got stuck in the salesforce limits and not understading exactly what to do in this case !!

Can anyone guide me on this ??

Thanks in Advance !!
Shashikant SharmaShashikant Sharma
Hi Sonal,

Could you post your code so that I could see if any optimization is possible.

Thanks
Shashikant