• sfdeveloper9
  • NEWBIE
  • 150 Points
  • Member since 2009

  • Chatter
    Feed
  • 6
    Best Answers
  • 3
    Likes Received
  • 0
    Likes Given
  • 73
    Questions
  • 49
    Replies

hi,

 

I want to close my Interaction log permanently from my Service Cloud Console. What are the possible solution for that?

 

Thanks,

 

How can I call this web service that's in an Apex class from Visual Force Page

 

WebService static String submitCourseRequirement(String requirementId) {
        return processRecordApprovalSubmission(requirementId, 'Requirement__c', new Requirement__Share());
    }

 

 

 

This is what i am doing in the visual force page

 

function Submit(reqId, seid, ccode){
       
        var answer = confirm("Would you like to proceed?");
      
            sforce.connection.sessionId = "{!$Api.Session_ID}";
           
        if (answer) {         

                try{          

                    var resultVal = sforce.apex.execute("StudentManagement","submitCourseRequirement", {requirementId:reqId});


                }catch(e){

                    ('This are not working: ' + e);

                } 


                ("Selected Note has been successfully submitted  for review.");

                return true;

                              

            }else{

                return false;

            }        

 

 

 

    <apex:commandLink action="{!saveComment}" rendered="{! NOT( exemptionCommentsBool)}" >
                        <apex:image id="theSubmitImage1" value="/servlet/servlet.FileDownload?file=015Q00000000z4M" width="50px" height="50px"/>
                    <apex:outputLink rendered="{!NOT(exemptionCommentsBool)}" value="{!$Page.SMRequirementsDownload}?seid={!StudentEngagement}" onClick="return Submit( '{!docReq.reqRecord.Id}', '{!StudentEngagement}', '{!CourseCode}');"/>
                    </apex:commandLink>

  

 

I know this is not the correct way because on click of the image, the function is not called. Can someone please point what i am doing wrong?

 

 

 

Hi all,

 

Parent : Agreement__c

Child : Agreement_line_item__c

 

I have a URL button on child as  /apex/MassInsertALI1?{!Agreement__c.Id}. 

 

I have to use this id to be captured and used through out the my custom controller and assign this id to the newly created child records. I know this can be done through the standard controller but the button is on the child related list on the parent page layout. 

 

Can you please help with this issue?

 

Thanks in advance 

 

VPrakash

Hi,

 

I am trying to get the number of ideas by status for th elogged in user. But i am getting the following error:

 

Error: Compile Error: unexpected token: 'where' at line 13 column 78

 public List<AggregateResult> IdeasSubmitted = new List<AggregateResult>();

IdeasUnderConsideration = [select count(id) from Idea group by status where CreatedById = '00530000003Xem5'];

 

 

Can anyone help me with this.

 

Thanks in advance

  • March 14, 2011
  • Like
  • 0
We are using Okta as SSO solution in our organization and Salesforce is configured for SSO via Okta. There is another app (X App) that is integrated with okta as well for authentication. Assuming users are common between the salesforce and  X app, how can X app invoke salesforce rest apis in a user context?
 
I am trying to update a CPQ quote via CPQ APIs with quote lines that comprise of a bundle product quote line and related quote lines that are form product options. 
I am passing all of them as product model using the Add Product API and Save Quote API. I am not able to populated the Required by field which ties all the product option quote lines to the bundle product and hence the edit lines page looks like this
  • Bundle Product
  • Product Option1
  • Product Option 2
What I want is 
  • Bundle Product
    • product option1
    • prodcut option2

Any help or pointers here is appreciated. TIA.
I want to show HTML Content (few paragraphs with some bullet points and indents) on one of the tabs in lightning community. What is the best way to show that? I know we can use HTML editor component but looking for more CMS based solution where User can update the content and publish to automatically reflect in the community. Looked at CMS workspace which supports images and video but not HTML, unless I am missing something. Any pointers are really helpful.
Thanks in advance.

Thanks in advance.
I want to expose a public home page for a lightning community and provide a login button which will authenticate and show a landing page after login. 
Is this possible with just one community or should I expose a public site page and the login action on the site page redirects to community login page? 
any pointers is much appreciated. Thanks in advance. 
I want to default the case origin to chat when new case tab is poped for chat request. We just have chat link and not a pre chat form. I have the below code included in the chat link but the origin is not set to 'Chat' on new case tab

liveagent.addCustomDetail('Case Origin','Chat');
liveagent.findOrCreate('Case').map('CaseOrigin','Case Origin',true,false,true);

Any suggestions are much appreciated. Thanks in advance.


 
I have a need where I need to check some condition in the start method of a batch apex and based on that database.querylocator query should execute. what is the best way to exit start without running database.queryLocator query. I tried returning null but it throws exception.
The workaround I have for now is putting a limit 0 for the query and executing the database.querylocator like below
if(some condition){
     //I want to exit the start method here and continue to the finish method.
       return database.queryLocator ('select id from account limit 0'); 
}
else{
       return database.queryLocator ('select id from account');
}

Please let me know if there is any better way to achieve this.
I have a Vf page with few input fields and controller associated with the vf page has some logic and inserts data. This is working fine in classic app. I am trying to move the same vf page to salesforce1 mobile app using publisher action. The page renders fine in mobile but submit is not working. I know we have to use remote action call to invoke the method in controller, but here in my case if I have 10 input fields do I have to pass all 10 as params to the remote action method or is there an alternative?
Thanks in advance.

We need to call a service which returns json content. The response contains salesforce reserved keywords as element/attribute names. when I try to create the binding class I am getting a compile error as date and currency are reserved keywords.

 

I know we can use deserializeUntyped or ask the service provider to make the change but trying to see if there is a clean and easy way to handle on salesforce side with binding class in place.

Below is a sample which is throwing error, Please let me know if anyone has any workarounds for this.

 

 

{
    "creditCard": {
      "id": "string",
      "firstName": "string",
      "lastName": "string",
      "cardNo": "string",
      "cvv": "string",
      "date": "string",
      "currency": "string"      
}
}

 

 

Binding class which gives compile error

 

public class CreditCardSample{

    public CreditCard creditCard;

    public class CreditCard {
        public String id;
        public String firstName;
        public String lastName;
        public String cardNo;
        public String cvv;
        public String date;
        public String currency;
    }

}

 

In service cloud console, we have a vf section on account page layout which will open a subtab. By default the subtab focus is set to false(active param set to false in openSubTab()). with this the tab is opened but the vf page on that tab is not loaded until user actually clicks on the second subtab.

Is there a way to load the second subta eventhough it is not highlighted or focused?

I am doing some debugging on my code to improve performance. I am going thru logs to see which block of code is taking more time.

I have a VF page and controller. The VF page is shown as vf section on a page layout out. In the log I see 800 milli secs consumed b/w serialize viewstate end and cumulative limit usage.

 

can somebody let me know what could consume that time. Thanks in Advance.

 

13:31:44.033 (1033848000)|VF_SERIALIZE_VIEWSTATE_BEGIN|066a00000013hMA
13:31:44.038 (1038597000)|VF_SERIALIZE_VIEWSTATE_END
13:31:44.813 (1047688000)|CUMULATIVE_LIMIT_USAGE
13:31:44.813|LIMIT_USAGE_FOR_NS|(default)|
  Number of SOQL queries: 2 out of 100

is there an easy way to refresh the navigation tab in service cloud console. I know we have push notifications setting we can configure. but I am looking for custom solution which can refresh the pinned left navigation from subtab on the right panel or any custom console components at the bottom of the console.

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.

we have three objects A, B & C.

B and C are child objects of A. Is there an easy way in SF to find out how many A records have atleast one B record and one C record. and how many A records have only B records and not C records.

 

I know we can create roll up formula fields on A and run a query. But I don't want to create those fields unless there is no other alternative.

 

Thanks in advance.

Using the send email option to send emails from activity history related list is creating a record in task. But the workflow on task is not firing for these activities. can any body please advice.

 

THanks in adance.

 

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.

we have configured SAML2.0 based SSO. we have created and deployed new domain in prod. SSO logout url is configured to redirect to sso logout page.

As a non sso user if I login through login.salesforce.com and logout it is redirecting me to sso logout page. I was expecting it should be redirected to secur/logout.jsp as I am not sso enabled user.

Is the redirect to sso logou page for a non sso user expected behavior? if so are there any workarounds to redirect non sso user to secur/logout.jsp

 

Thanks in advance.

 

Is there a way to hide some opportunities from the related account owner.

 

Ex : Account1 - owner is John

        Opty 1 - owner is John

        Opty 2 - owner is Mike

 

Can we hide opty2  from John?

 

Thanks in Advance.

Is there a way to hide some opportunities from the related account owner.

 

Ex : Account1 - owner is John

        Opty 1 - owner is John

        Opty 2 - owner is Mike

 

Can we hide opty2  from John?

 

Thanks in Advance.

 

 

Is there a way in apex to know what record types the logged in user has access to on particular object?

Thanks.

Is there a way to restrict the ownership transfer to only users in role below the current user role in the role hierarchy.

Ex: I have below  Roles :

 

Dept A Manager

            Dept A subordinate

Dept B Manager

            Dept B Subordinate.

 

users with Dept A manager role should only be able to transfer a record to any user with Dept A subordinate role

users with Dept B manager role should only be able to transfer a record to any user with Dept B subordinate role

 

Thanks in advance.

I have a Vf page with few input fields and controller associated with the vf page has some logic and inserts data. This is working fine in classic app. I am trying to move the same vf page to salesforce1 mobile app using publisher action. The page renders fine in mobile but submit is not working. I know we have to use remote action call to invoke the method in controller, but here in my case if I have 10 input fields do I have to pass all 10 as params to the remote action method or is there an alternative?
Thanks in advance.

is there an easy way to refresh the navigation tab in service cloud console. I know we have push notifications setting we can configure. but I am looking for custom solution which can refresh the pinned left navigation from subtab on the right panel or any custom console components at the bottom of the console.

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 doing some debugging on my code to improve performance. I am going thru logs to see which block of code is taking more time.

I have a VF page and controller. The VF page is shown as vf section on a page layout out. In the log I see 800 milli secs consumed b/w serialize viewstate end and cumulative limit usage.

 

can somebody let me know what could consume that time. Thanks in Advance.

 

13:31:44.033 (1033848000)|VF_SERIALIZE_VIEWSTATE_BEGIN|066a00000013hMA
13:31:44.038 (1038597000)|VF_SERIALIZE_VIEWSTATE_END
13:31:44.813 (1047688000)|CUMULATIVE_LIMIT_USAGE
13:31:44.813|LIMIT_USAGE_FOR_NS|(default)|
  Number of SOQL queries: 2 out of 100

 

Can any one post a sample test method for knowledge article version test data insertion.?

  • March 15, 2013
  • Like
  • 0

I need to create a KnowledgeArticle object for my test class. but there no DML operations allowed on KnowledgeArticle. 

Any idea how I could bypass this?

 

Thank you  

 

  • November 14, 2012
  • Like
  • 0

I've had issues with my users having mutiple service cloud consoles opened.  Whenever she makes an update on case status on console window A, the changes are not reflected on console window B, unless she clicks on refresh.  

 

She was on the list view on Console Window B, clicked on the case, and the case frame did not automatically refresh if the case is already opened on another tab.  

 

Is there a way to cause the page frame to refresh every time the user clicks on the case from the list view, regardless if it's opened on a tab or not?

 

I could probably write a javascript button for the case frame to reload but I want to save the user from having to do the extra click if possible.

  • September 05, 2012
  • Like
  • 0

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.

Using the send email option to send emails from activity history related list is creating a record in task. But the workflow on task is not firing for these activities. can any body please advice.

 

THanks in adance.

 

Is there a way to hide some opportunities from the related account owner.

 

Ex : Account1 - owner is John

        Opty 1 - owner is John

        Opty 2 - owner is Mike

 

Can we hide opty2  from John?

 

Thanks in Advance.

 

 

hi,

 

I want to close my Interaction log permanently from my Service Cloud Console. What are the possible solution for that?

 

Thanks,

 

I want to include home page in a VF, Please advise.

 

Thanks,

PK

How can I call this web service that's in an Apex class from Visual Force Page

 

WebService static String submitCourseRequirement(String requirementId) {
        return processRecordApprovalSubmission(requirementId, 'Requirement__c', new Requirement__Share());
    }

 

 

 

This is what i am doing in the visual force page

 

function Submit(reqId, seid, ccode){
       
        var answer = confirm("Would you like to proceed?");
      
            sforce.connection.sessionId = "{!$Api.Session_ID}";
           
        if (answer) {         

                try{          

                    var resultVal = sforce.apex.execute("StudentManagement","submitCourseRequirement", {requirementId:reqId});


                }catch(e){

                    ('This are not working: ' + e);

                } 


                ("Selected Note has been successfully submitted  for review.");

                return true;

                              

            }else{

                return false;

            }        

 

 

 

    <apex:commandLink action="{!saveComment}" rendered="{! NOT( exemptionCommentsBool)}" >
                        <apex:image id="theSubmitImage1" value="/servlet/servlet.FileDownload?file=015Q00000000z4M" width="50px" height="50px"/>
                    <apex:outputLink rendered="{!NOT(exemptionCommentsBool)}" value="{!$Page.SMRequirementsDownload}?seid={!StudentEngagement}" onClick="return Submit( '{!docReq.reqRecord.Id}', '{!StudentEngagement}', '{!CourseCode}');"/>
                    </apex:commandLink>

  

 

I know this is not the correct way because on click of the image, the function is not called. Can someone please point what i am doing wrong?

 

 

 

Hello Experts ,

 

I have question it  may be basic question.

 

how to generate a Apex class from WSDlL i know one way is

 

click on the button "Generate from wsdl".

 

is there other way like wsdl2apex, i red  that we can generate the Apex class using wsdl2apex.

 

can any one clarify me on this.

 

if we can generate Apex  class using WSDL2Apex , what is the process to do that.

 

I Appreciate  we could provide me the process from starting how to generate Apex class using "WSDL2APex".

 

 and how to use HTTPHeader .

 

 

Thank you

 

  • August 05, 2011
  • Like
  • 0

Hi,

Iam new to apex and managed to write a batch apex class. We have an object <object1> and we have a trigger on 'after update' event on that object. This trigger invoke one @future method.

In my batch apex Iam updating a field on <object1> and calling the update operation on that object. I get a system exception "System.AsyncException: Future method cannot be called from a future method:". I read through various posting and found that we cannot invoke a future method from the batch apex because of the async behavior.

I cannot remove the @future from my trigger, is there any way I can get this to work? If batch apex is not the route to be taken, what would be my other alternative to schedule a apex class to update the field on the object.

I appreciate your help

JP.

Hi all,

 

I'm trying to figure out how to find the Id of the account the current user is associated with. I want to limit a query to find only records associated with that account. I thought there was a $User.account or something, but there doesn't seem to be. Any ideas?

 

Thanks,

Sam

Is there a way in salesforce or any API that can convert a apex class object to an xml dynamically.

Ex: If I have a class like this

public class Sample{

       String firstName;

       String lastName;

       String phone;

}

 

Can I get an xml out that class like

<Sample>

    <firstName>Bob</firstName>

    <lastName>Smith</firstName>

    <phone>3454362342</phone>

</Sample>

 

I know we can do it by using Document and XMLNode classes, but we have to add the child elements hardcoded.

Is there any way to build xml dynamically.

 

Thanks,

PK

 

I want to remove Save & New button on Account edit page layout. I saw some older posts where S-control was a solution to get the button Id and disable it. but we have a new salesforce instance, where s - controls cannot be created. Please let me know if there is any other work around to just disable that button on the edit page layout.

 

Thanks,

PK

we have person accounts enabled. I am trying to override Edit button to go to VF page.

Can we show Person Account Icon(person image) on the VF page instead of the regular Account icon(Folder image).

 

Thanks,

PK