You need to sign in to do that
Don't have an account?
Karthikeyan Chandran
Opportunity custom List Button error?
Hi,
Here, the related list button should visible only when i choose the values "REQ", "Solution Sale" in the picklist field 'Pre Opportunity Type' and the picklist Approval Status valus is "Approved".
So, I just used the below java script to create a list button and i got an error,
https://developer.salesforce.com/forums/servlet/rtaImage?eid=906F0000000BYUM&feoid=Body&refid=0EMF0000000RD3C (https://developer.salesforce.com/forums/servlet/rtaImage?eid=906F0000000BYUM&feoid=Body&refid=0EMF0000000RD3C)
https://developer.salesforce.com/forums/servlet/rtaImage?eid=906F0000000BYUM&feoid=Body&refid=0EMF0000000RD3H (https://developer.salesforce.com/forums/servlet/rtaImage?eid=906F0000000BYUM&feoid=Body&refid=0EMF0000000RD3H)
In my URL:
https://cs50.salesforce.com/006/e?retURL=%&oppid=
The error message is:
Illegal Request
You have sent us an Illegal URL or an improperly formatted request.
I don't know what i am missing here. i already post a question link - https://developer.salesforce.com/forums/ForumsMain?id=906F0000000BYUMIA4#
I need to fix it immediately ASAP.
Can you help me on this?
Thanks & Regards,
Karthikeyan Chandran
Here, the related list button should visible only when i choose the values "REQ", "Solution Sale" in the picklist field 'Pre Opportunity Type' and the picklist Approval Status valus is "Approved".
So, I just used the below java script to create a list button and i got an error,
https://developer.salesforce.com/forums/servlet/rtaImage?eid=906F0000000BYUM&feoid=Body&refid=0EMF0000000RD3C (https://developer.salesforce.com/forums/servlet/rtaImage?eid=906F0000000BYUM&feoid=Body&refid=0EMF0000000RD3C)
https://developer.salesforce.com/forums/servlet/rtaImage?eid=906F0000000BYUM&feoid=Body&refid=0EMF0000000RD3H (https://developer.salesforce.com/forums/servlet/rtaImage?eid=906F0000000BYUM&feoid=Body&refid=0EMF0000000RD3H)
{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/29.0/apex.js")} if('{!Pre_Opportunity_Stage__c.Pre_Opportunity_Type__c}' == 'RFQ','{!Pre_Opportunity_Stage__c.Pre_Opportunity_Type__c}' == 'Solution Sale'){ window.open('https://cs50.salesforce.com/006/e?retURL=%{!Account.Id}&accid={!Account.Id}'); } else{ alert('You can not create new oppty'); }
In my URL:
https://cs50.salesforce.com/006/e?retURL=%&oppid=
The error message is:
Illegal Request
You have sent us an Illegal URL or an improperly formatted request.
I don't know what i am missing here. i already post a question link - https://developer.salesforce.com/forums/ForumsMain?id=906F0000000BYUMIA4#
I need to fix it immediately ASAP.
Can you help me on this?
Thanks & Regards,
Karthikeyan Chandran
All Answers
Problem is that, Account field not specified on your record. You can add this condition to your js code.
As a common practice, if your question is answered, please choose 1 best answer.
But you can give every answer a thumb up if that answer is helpful to you.
Thanks,
Alex
Thanks,
Alex
Got the same error..
https://cs50.salesforce.com/006/e?retURL=%&oppid=
The screen shot -
Can you try to replace?
on
It's work now, or not?
No changes!!
try to clear you cach(if u using crome press Ctrl + Shift + Del) and check only "Cached images and files" or use another browser.
Thank you so much. It's worked, i can create a new opportunity after i cleared the cache in my browser.
One more clarififation,
The new record page (Opportunity) is not showing the proior page with list of record types, it's directed to me opportunity detail page.
How do i direct to new page ti choose which record type the users after they click on the custom list button.
Here the screen shot that i want to direct this page.
The currect code redirect me to directly to the opportunity edit page.
{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/29.0/apex.js")}
if(('{!Pre_Opportunity_Stage__c.Pre_Opportunity_Type__c}' == 'RFQ'||'{!Pre_Opportunity_Stage__c.Pre_Opportunity_Type__c}' == 'Solution Sale') && ('{!Pre_Opportunity_Stage__c.Approval__c}' == 'Approved')){
if ('{!Account.Id}' != '') {
window.open('https://cs50.salesforce.com//setup/ui/recordtypeselect.jsp?ent=Opportunity&save_new_url=/006/e?accid={!Account.Id}');
} else {
window.open('https://cs50.salesforce.com/006/e');
}
}
else{
alert('You can not create new oppty');
}
Any idea Alex?
After click button you need redirected to url, that contains '/setup/ui/recordtypeselect.jsp?ent=Opportunity&save_new_url=/006/e'