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
Akash Garg 2Akash Garg 2 

custom button on custom related list is not working on particular profile

Hi

I have created a new custom profile and for this profile, my custom button on custom related list is not working but it is working for all other profiles.

Button code is:-
if('{!Opportunity_Product_Group__c.RecordTypeId}'== '{!$Setup.Record_Type__c.OPG_Towel__c}') { 
window.open("/a1Z/e?retURL={!Opportunity_Product_Group__c.Id}&RecordType={!$Setup.Record_Type__c.OP_Towel__c}&{!$Setup.Record_Type__c.OPG_Feild__c}={!Opportunity_Product_Group__c.Name}",'_top'); 
} 
else if('{!Opportunity_Product_Group__c.RecordTypeId}'== '{!$Setup.Record_Type__c.OPG_Bathrobe__c}'){ 
window.open("/a1Z/e?retURL={!Opportunity_Product_Group__c.Id}&RecordType={!$Setup.Record_Type__c.OP_Bathrobe__c}&{!$Setup.Record_Type__c.OPG_Feild__c}={!Opportunity_Product_Group__c.Name}",'_top'); 

} 
else if('{!Opportunity_Product_Group__c.RecordTypeId}'== '{!$Setup.Record_Type__c.OPG_Sheeting__c}'){ 
window.open("/a1Z/e?retURL={!Opportunity_Product_Group__c.Id}&RecordType={!$Setup.Record_Type__c.OP_Sheeting__c}&{!$Setup.Record_Type__c.OPG_Feild__c}={!Opportunity_Product_Group__c.Name}",'_top'); 

}

please can anyone knows how to solve this, as this is very urgent.
Rohit B ☁Rohit B ☁
r u getting some kind of error or message?
Akash Garg 2Akash Garg 2
no i didn't get any error message.
Akash Garg 2Akash Garg 2
can anyone has any suggestions or solution for this