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
Krzysztof NowackiKrzysztof Nowacki 

​"cstatus" error in custom convert button

Hi,
Ive created custom lead convert button: 
/lead/leadconvert.jsp?retURL=%2F{!Account.Id}&id={!Lead.Id}&cstatus={!Lead.Status}

where I want to pass lead status name to lead converting page.
I have two lead statutes marked as "Converted": "qualifield" and "marketing  qualifield"

The converting page appears with this lead name copied but after clicking "convert" (with status marked in setup as converted) converted status pick list get 3 choices becouse is not matching previous lead status (just adding next option).

Then clicking convert the below error page/info appears:

Unable to Access Page
The value of the "cstatus" parameter contains a character that is not allowed or the value exceeds the maximum allowed length. Remove the character from the parameter value or reduce the value length and resubmit. If the error still persists, report it to our Customer Support team. Provide the URL of the page you were requesting as well as any other related information. 

Any ideas how to fix this? :)

Best
NagaNaga (Salesforce Developers) 
Hi Krzysztof,

User-added image
Your URL syntax will be as follows:
/lead/leadconvert.jsp?retURL=%2F{!Lead.Id}&id={!Lead.Id}&nooppti=1&cstatys={!Lead.Status}

Save the button.
Now go to your Lead Page Layout editor, remove the existing Convert button and add the one you just created.

Couple quick things:

1. You may have to go to your Lead Status pick list and modify each value to be a Converted Status. I am not sure about this but I think you may have to.
2. The URL I gave you automatically flags the "Do not create a new opportunity upon conversion" option. If you want to change that you can remove the &nooppti=1 from the URL and the system will revert back to the default.

Let me know if you have any additional questions.

Best Regards
Naga Kiran

 
Krzysztof NowackiKrzysztof Nowacki
Hi @Naga
thx
Done it. It doesnt work also. The problem is that this &cstatus={!Lead.Status}  is populating me correct status name to convert page but no matching it with real lets say ID of this name (pick list value) so it is making me double values on this convert page.
When I done this like this: /lead/leadconvert.jsp?retURL=%2F{!Lead.Id}&id={!Lead.Id}&cstatus=6

so with the number next to cstatus Im able to have static transfer of this data and the match is ok.  However I do want to have it dynamicaly. 
Best
Kris
Penelope GatlinPenelope Gatlin
I was having the same issue. This will solve all your problems. I am so grateful to this blogger: http://fullcircleinsights.com/pre-populating-converted-status-on-lead-conversion/