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
Sharmila SahooSharmila Sahoo 

I have one custom button on a page that is invoking one flow. I am able to run this flow using one profile but not able to do so using another profile.

I have one custom button on a page that is invoking one flow. I am able to run this flow using one profile but not able to do so using another profile. User-added image
Java Script Code:

{!REQUIRESCRIPT("/soap/ajax/14.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/14.0/apex.js")}
{!REQUIRESCRIPT("/xdomain/xdomain.js")}
{!REQUIRESCRIPT("/support/console/30.0/integration.js")}

try{
var caseId='{!Case.Id}';
var isArleadyInProgress='No';
var prodNme="{!Case.Product}";
var contNme="{!Case.Contact}";
var projName="{!Case.ProjectName__c}";
var spend="{!Case.Project_value__c}";
var optyId="{!Case.Opportunity__c}";


var additnlParame='';
if(prodNme!=null && prodNme!='' && prodNme!='null')
{
prodNme=escape(prodNme);
additnlParame="&ProductName="+prodNme;
}

if(contNme!=null && contNme!='' && contNme!='null')
{
contNme=escape(contNme);
additnlParame=additnlParame+"&ContactName="+contNme;
}




if(
(prodNme!=null && prodNme!='' && prodNme!='null')&&
(contNme!=null && contNme!='' && contNme!='null') &&
(spend!=null && spend!='' && spend!='null') &&
(projName!=null && projName!='' && projName!='null')
)

{

var flowURL="./apex/BPCreateSavingHeader?cid="+caseId+'&retURL='+caseId;
if(additnlParame!='')
flowURL=flowURL+additnlParame;


if(optyId==null || optyId=='' || optyId=='null')
{
if (sforce.console.isInConsole()) {
srcUp(flowURL);
} else {
window.location.href=flowURL;
}
}
else
{
alert("Opportunity is already created");
}

}

else{ alert("Please enter Product,Contact,Project Name,Start Date and Spend"); }


}

catch(err) {
txt="There was an error occurred during opportunity creation \n\n";
txt+="Error description: " + err.description + "\n\n";
txt+="Click OK to continue.\n\n";
alert(txt);
}



User-added image

Create Saving Header is button


This is in voking one flow not working with one profile .


 
SandhyaSandhya (Salesforce Developers) 
Hi,

Please make sure if "Run Flows" checked on the profile and Force.com Flow User checked on the profile. 

Please refer below link for a similar issue.

https://developer.salesforce.com/forums/?id=906F00000009AMlIAM
 
Hope this helps you!

If this helps you please mark it as solved.

Thanks and Regards
Sandhya