• skaus
  • NEWBIE
  • 25 Points
  • Member since 2010

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 16
    Replies

Hi All,

 

I have customized service console using service console toolkit. As per customization , when a user while in service console clicks on an activity from the list view , I open account in the primary tab and case , account details and activity details in subtab.

 

Since , currently , there is no option to open an activity as a subtab of account (unlike case). I open activity detail in primary tab and then open account as anoher primary tab having account details , case and activity as subtabs.

 

The problematic behavior I am facing is that when user clicks on edit and then clicks on the activity opened in subtab , instead of showing the detail activity page , it closes the activity page.

 

Has anyone run into a similar problem ? Pls let me know if you guys have a solution or ideas.

 

Thanks

  • March 21, 2012
  • Like
  • 0

I am facing kind of a similar problem.

 

I have a profile : AFA Help Desk with following features :

1. Manage Cases - check

2. Transfer cases - check

3. Sharing rule based on case record type that grants Read/Write access to the concerned role.

 

Use Case : AFA Help Desk profile user updates a case with a particular status , based on status value , case owner is changed to a different profile.

Error :

You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary.
 
Following points to be noted :
Error comes only when  trying to update via trigger. This user can update owner manually.
Even if trigger code is changed so that case.owner is set to the current owner himself. , it gives the same error.
The class refrenced in trigger is not using with sharing keyword.
Case has private sharing model but has been shared with this users' role via sharing settings.
 
This  issue has left me clueless. Any replies appreciated.
  • December 08, 2011
  • Like
  • 0

Hi All,

 

I have overridden , New Case button with on-click Javascript . Code works fine in all scenarios except one. When user clicks on New Case in Service Console , Case hover. If I scroll down to the Case related list in service console and then click on New Case it works fine in that case.

 

This is only happening in IE. Code works fine in Firefox.

 

Code :

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

 

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

var RecordTypeFinAid= "Finance Advisor FinAid Case";
var RecordTypeNonFinAid= "Finance Advisor Non-FinAid Case";
var case1 = "Case";
var currentAccresults1=sforce.connection.query ("select Id from RecordType where Name='"+ RecordTypeFinAid+ "'" );
var AccRecords1=currentAccresults1.getArray("records");
var currentAccresults2=sforce.connection.query ("select Id from RecordType where Name='"+ RecordTypeNonFinAid+ "'" );
var AccRecords2=currentAccresults2.getArray("records");
var status={!('"'+Account.Acct_Status__c+'"')};

var url1= "/500/e?retURL=%2F{!Account.Id}&def_account_id={!Account.Id}&RecordType="+AccRecords1[0].get('Id')+"&ent=Case";
var url2= "/500/e?retURL=%2F{!Account.Id}&def_account_id={!Account.Id}&RecordType="+AccRecords2[0].get('Id')+"&ent=Case";
var url_finAid =url1+"&isdtp=vw";
alert(typeof(srcUp));
if (typeof(srcUp) == 'function') {

if(status!=null &&   (  (status).match("FINAID") !=null  )  )
srcUp(url_finAid );
else
srcUp(url2+"&isdtp=vw");


}else{
if(status!=null &&   (  (status).match("FINAID") !=null  )  )
window.location.replace(url1);
else
window.location.replace(url2);

}

 

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

 

Any help is appreciated. Its driving me crazy !!

  • November 21, 2011
  • Like
  • 0

Hi I am trying to make my visualforce page pretty by applying some cool Jquery features. But I am just not able to start off.

 

I have a VF page that is included as a section in the opportunity standard page layout. I want this page not to appear at one go but rather as a link and then something like slider thing that shows the whole page. The reason is , this inserted page is long and it makes the overall page too long.

 

Why won't below work ?...

<script src="{!URLFOR($Resource.jQueryFiles, 'js/jquery-1.4.4.min.js')}"/> <script src="{!URLFOR($Resource.jQueryFiles, 'js/jquery-ui-1.8.7.custom.min.js')}"/> <script type="text/javascript"> var $j = jQuery.noConflict(); $j(document).ready(function(){ $j("#trying").dialog({ autoOpen: false, modal: true, position: 'center' }); }); }); </script>
//Page code with pageblocksection and stuff

 



 



  • October 28, 2011
  • Like
  • 0

 Hi All,

 

I have this opportunity object for which many record types have been defined.
When user clicks on opportunity tab and then new opportunity button , it prompts for record type selection where as when user clicks on new opportunity button from the related list on account detail page , it takes the default record type value and doesn't prompt user.

I want to prompt user to choose a record type even when coming from account detail page. I have looked at profile record type setting and my personal record type setting has the checkbox unchecked.

Any idea why is it happening ? Is it because opportunity object has trigger defined on it?

I have the contract object for which record type prompt is always happending even though all record type settings are same as for opportunity object but contract doesn't have any trigger defined for it.

I am really baffled over it , and help would be greatly appreciated .

Thanks in advance.

 

 

  • January 29, 2010
  • Like
  • 0

In the User's Guide there is a sample http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_test.htm?CSHID=apex_methods_system_test.htm#TestLoadDataExampleSection

of how to use the Test.loadData method to load a csv file with Accounts.

 

I cannot see any documentation nor samples showing how to load records with references (lookup or master-detail) to parent records - e.g. if I want to load Contacts, which refer to Accounts.

 

Anyone who knows. I suppose I am not going to "invent" record IDs????

Is there a easy way to test the following governor limits

 

A callout request to a given URL is limited to a maximum of 20 simultaneous requests.

 

Each organization is allowed 10 synchronous concurrent events, each not lasting longer than 5 seconds. If additional requests are made while 10 requests are running, it is denied.

 

I want to hit this governor limits with a small piece of code or by calling a sample service..

 

Thanks in advance.

In Service cloud console we have a custom edit button on account which redirects to a vf page. There is a custom Save button on this page. If we change any data(like phone number ) and save it, the new info is not refreshed in the highlights panel.

However if we use the standard edit page or inline edit the highlights panel is automatically refreshed to show the update info.

 

Is there a way to just refresh the hightlights panel?

 

Thanks in Advance.

I am facing kind of a similar problem.

 

I have a profile : AFA Help Desk with following features :

1. Manage Cases - check

2. Transfer cases - check

3. Sharing rule based on case record type that grants Read/Write access to the concerned role.

 

Use Case : AFA Help Desk profile user updates a case with a particular status , based on status value , case owner is changed to a different profile.

Error :

You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary.
 
Following points to be noted :
Error comes only when  trying to update via trigger. This user can update owner manually.
Even if trigger code is changed so that case.owner is set to the current owner himself. , it gives the same error.
The class refrenced in trigger is not using with sharing keyword.
Case has private sharing model but has been shared with this users' role via sharing settings.
 
This  issue has left me clueless. Any replies appreciated.
  • December 08, 2011
  • Like
  • 0

Hi All,

 

I have overridden , New Case button with on-click Javascript . Code works fine in all scenarios except one. When user clicks on New Case in Service Console , Case hover. If I scroll down to the Case related list in service console and then click on New Case it works fine in that case.

 

This is only happening in IE. Code works fine in Firefox.

 

Code :

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

 

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

var RecordTypeFinAid= "Finance Advisor FinAid Case";
var RecordTypeNonFinAid= "Finance Advisor Non-FinAid Case";
var case1 = "Case";
var currentAccresults1=sforce.connection.query ("select Id from RecordType where Name='"+ RecordTypeFinAid+ "'" );
var AccRecords1=currentAccresults1.getArray("records");
var currentAccresults2=sforce.connection.query ("select Id from RecordType where Name='"+ RecordTypeNonFinAid+ "'" );
var AccRecords2=currentAccresults2.getArray("records");
var status={!('"'+Account.Acct_Status__c+'"')};

var url1= "/500/e?retURL=%2F{!Account.Id}&def_account_id={!Account.Id}&RecordType="+AccRecords1[0].get('Id')+"&ent=Case";
var url2= "/500/e?retURL=%2F{!Account.Id}&def_account_id={!Account.Id}&RecordType="+AccRecords2[0].get('Id')+"&ent=Case";
var url_finAid =url1+"&isdtp=vw";
alert(typeof(srcUp));
if (typeof(srcUp) == 'function') {

if(status!=null &&   (  (status).match("FINAID") !=null  )  )
srcUp(url_finAid );
else
srcUp(url2+"&isdtp=vw");


}else{
if(status!=null &&   (  (status).match("FINAID") !=null  )  )
window.location.replace(url1);
else
window.location.replace(url2);

}

 

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

 

Any help is appreciated. Its driving me crazy !!

  • November 21, 2011
  • Like
  • 0

I want to add a button on edit page of a record (say button which opens an external URL in a new window, may be a a url for reference). How do I achieve so?


There's always option of overriding with visualforce page, but there's lot of pitfalls around that approach (say a new recordtype or field is added, you need to create new visualforcce page or update the page respectively etc)

Any idea on how to achieve this? 

 

Chirag

From the Case object, we have a custom button that creates an RMA with case and account information filled in and then opens the new RMA record. It works fine in the normal salesforce.com.

 

In the Service Cloud Console, we have Accounts, Cases, and RMA's. If we create new Cases or new RMA's from the Account, the new records get create in new subtabs to the account.

 

But if we launch our CaseToRMA page from the case in a Service Cloud Console subtab, it results in a whole new instance of saleforce.com running in the original case tab. What we want is for the new RMA to open in a new subtab under the account and to leave the case open.

 

CasetoRMA class

 

public class CaseToRMA {
    public Case c {get; set;}
    public RMA__c rma {get; set;}
public CaseToRMA () { c = [ select c.Id, c.CaseNumber, c.Account.ShippingCountry, c.Account.ShippingPostalCode, c.Account.ShippingState, c.Account.ShippingCity, c.Account.ShippingStreet, c.Account.Name, c.AccountId from Case c where id = : apexPages.currentPage().getParameters().get('id')];
List<Settings__c> cs = [ select RMA_Warehouse__c from Settings__c]; RMA__c rma = new RMA__c( ZipPostalCode__c = c.Account.ShippingPostalCode, Warehouse__c = (cs.size() > 0) ? cs[0].RMA_Warehouse__c : null, Street__c = c.Account.ShippingStreet, StreetTextArea__c = c.Account.ShippingStreet, RMADate__c = system.today(), Country__c = c.Account.ShippingCountry, City__c = c.Account.ShippingCity, Case__c = c.Id, Account__c = c.AccountId, AccountName__c = c.Account.Name, Reference__c = c.CaseNumber); }

public PageReference NewRMA() {
insert rma;
return new PageReference('/' + rma.id);
}

 

 

 

 VisualForce Page

<!-- Old way -->
<apex:page controller="CaseToRMA" action="{!newRMA}" >
<!-- Attempt at opening in a new tab
<apex:page controller="CaseToRMA" action="{!newRMA}" >
    <apex:includeScript value="/support/console/20.0/integration.js"/>
    <script type="text/javascript">
        function init() {
                //First find the ID of the primary tab to put the new subtab in
            sforce.console.getEnclosingPrimaryTabId(openSubtab);
        }
        var openSubtab = function openSubtab(result) {
                //Now that we've got the primary tab ID, we can open a new subtab in it
            var primaryTabId = result.id;
            sforce.console.openSubtab(primaryTabId , '/' + rma.id, false,
                rma.Name, null, null);
        };
    </script>
    <body onLoad="Init()"/>
-->
</apex:page>

 If someone has a working example of this, it would be great.

 

 

 Hi All,

 

I have this opportunity object for which many record types have been defined.
When user clicks on opportunity tab and then new opportunity button , it prompts for record type selection where as when user clicks on new opportunity button from the related list on account detail page , it takes the default record type value and doesn't prompt user.

I want to prompt user to choose a record type even when coming from account detail page. I have looked at profile record type setting and my personal record type setting has the checkbox unchecked.

Any idea why is it happening ? Is it because opportunity object has trigger defined on it?

I have the contract object for which record type prompt is always happending even though all record type settings are same as for opportunity object but contract doesn't have any trigger defined for it.

I am really baffled over it , and help would be greatly appreciated .

Thanks in advance.

 

 

  • January 29, 2010
  • Like
  • 0

Hi All

 

I have written a trigger as below

trigger testChangeOwnerTrigger on Case (before insert) { for(Case newCase : Trigger.New){ newCase.OwnerId ='005R0000000IufqIAC'; } }

 

Here the 'created use'r and 'new owner user' has the same profile.

 

This trigger is working correctly when I create case with System Administrator profile user, but when create case with other profile user then it throw an error "Insufficient Privileges You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary. Click here to return to the previous page "

 

I checked the profile & it has all data modification permissions.

 

Any idea?

 

Thanks

 


 

I have these number of records in the database for the following queries:

 

Total Parent__c records = 2800

Total Child__c records  = 77,800

 

On an average, each parent has around 30 childs.

 

When I run the following piece of code, I get a governor limit error (query row). Note that I get retrieving only 10 parent records! I still get this error. I  debug log says that only 177 records out of allowed 10,000 were retrieved.  Seems like there is some issue with Childs__r.size() statement. 

 

 

 

for (Parent__c p: [select Name,
(select Name from Childs__r)
from Parent__c limit 20] {
i++;
System.debug('i is ' + i);
System.debug('Name is ' +p.Name);
Double count =p.Childs__r.size();
System.debug('Child Count is ' + count);


}

 

System Log says:

 

 

12:44:31 ERROR - Evaluation error: System.QueryException: Aggregate query has too many rows for direct assignment, use FOR loop

 

Resource usage for namespace: (default)

Number of SOQL queries: 1 out of 100

Number of query rows: 177 out of 10000

Number of SOSL queries: 0 out of 20

Number of DML statements: 0 out of 100

Number of DML rows: 0 out of 10000

Number of script statements: 51 out of 200000 

 

 

When I write a differenr query where I get 1100 Parents, the query ran for 6 minutes and and I loop through every child of it,  I am able to go through 29678 records (i=29678).  The debug log says that that number of query rows is 1267...records...what's going on? 

 

 

for (Parent__c p: [select Name,
(select Name from Childs__r)
from Parent__c limit 1100] {

for (Child__c c:p.Childs__r) {

i++;
System.Debug(‘Child Name is ‘ + c.Name);
}

}

System.debug('i is ' + i);

 

 Debug Log:

 

Resource usage for namespace: (default)

Number of SOQL queries: 1 out of 100

Number of query rows: 1267 out of 10000

Number of SOSL queries: 0 out of 20

Number of DML statements: 0 out of 100

Number of DML rows: 0 out of 10000

Number of script statements: 59362 out of 200000

Maximum heap size: 938 out of 1000000 

 

 

 

 

Message Edited by GoForceGo on 03-02-2009 12:47 PM
Message Edited by GoForceGo on 03-02-2009 12:47 PM
Message Edited by GoForceGo on 03-02-2009 12:48 PM