• Ramu_SFDC
  • PRO
  • 3012 Points
  • Member since 2014

  • Chatter
    Feed
  • 92
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1151
    Replies
Hello all,
I want to display a text in the Chatter Group Edit page (displayed when clicking the "Group Settings" in a Chatter Group page, or when clicking the "New Group" button in the Groups tab). To do that, I edited a Chatter Group layout found in Setup | Customize | Chatter | Groups | Group layouts, added a Visualforce page that contains the text, and assigned the result layout to all users. However, when I go to a Chatter group edit page, I don't see any changes. Can anyone tell if in their org, the manipulation working, and why in mine I can't see the modifications?

Thanks a lot,

Karen
Hi All,

Understood that the SSO for salesforce.com in web broswer can implemented by SAML2, and there're lots docs on this setup. But my question is to have SSO on Salesforce1,  assumed one org enable some VF page visible in Salesforce1 mobile app. Can we still reuse same SAML2.0 setting? or we need to use the combination of SAML and OAuth?  Any one have real project experience on the first question, could help to provide a guideline? Thanks very much!
  • September 05, 2014
  • Like
  • 0
Hi Everybody,
      Can anyone tell me type of community user license and how they are differed ?

Thanks in advance
Karthick
Backgroud: I need access SAP from salesforce. SAP server is in  company intranet. Salesforce cloud is in outer net.
There is a gateway between SAP server and Salesforce cloud.
So first,I need a http request to login gateway with company's username and  password. The the gateway will respones 3 cookies.
I should include  these 3 cookies when I access the sap SOAP webservice.
I'm able to access SAP SOAP webservice in .Net as below.
//Creat request to login gateway
            System.Net.HttpWebRequest request = (HttpWebRequest)WebRequest.Create("gateway/login");
            String PostString = "user=myusername&password=mypassword&btn_login=Logn-On&idpid=at_hp";
            System.Text.UTF8Encoding encoding = new System.Text.UTF8Encoding();
            byte[] buffer = encoding.GetBytes(PostString);
            request.AllowAutoRedirect = false;
            request.ContentType = "application/x-www-form-urlencoded";
            request.Method = "POST";
            request.CookieContainer = new CookieContainer();
            Stream reqstr = request.GetRequestStream();
            reqstr.Write(buffer,0,buffer.Length);
            reqstr.Close();
            HttpWebResponse response = (HttpWebResponse)request.GetResponse();
//get the respones cookies
            CookieCollection mycookies = response.Cookies;
// Create sap SOAP webservice
            Z_WEBSERVICESService SAPWSDL = new Z_WEBSERVICESService();
// use the cookies
            SAPWSDL.CookieContainer = new CookieContainer();
            SAPWSDL.CookieContainer.Add(mycookies[0]);
            SAPWSDL.CookieContainer.Add(mycookies[1]);
            SAPWSDL.CookieContainer.Add(mycookies[2]);
//set the credential
            System.Net.NetworkCredential cred = new System.Net.NetworkCredential();
            cred.UserName = "SAPusername";
            cred.Password = "SAPpassword";
            SAPWSDL.Credentials = cred;
//access SAP webservice.
            string xx = SAPWSDL.Z_WEBSERVICES();
I have some qustion about how to convert this code to apex.
1 In Apex, how to use cookies?
2 how to set AllowAutoRedirect = false? If Redirect,I can't get respones with cookies.
3 When use SOAP in Apex,is there a way to set cookies and credential.

Hi, I need the edit view of a page to be a VF page that I created, but I need the standard Tab view to be the usual query page that shows List Views, etc.  Is there a way to do this?  With Page Layouts I can assign a VF page but it's through that silly embed feature, and with the 3rd party plugins that I'm using it doesn't work.  The product I'm using to get the features I need in the VF page DO NOT work in an embedded VF page (they know this) and therefore I'm left with assigning the VF page to a Tab... or what else could I do?  Are there any other options?
Hi folks,
     Can anyone tell me what is the problem in my test class??

Apex Trigger:
  trigger Test_Share on Test__c (after insert) {
   
    Id UserId=UserInfo.getUserId();
    Boolean bln=false;
    List<Id> ParentUserId = new List<Id>();
    User u = new User();
    while(bln == false){
       
      u = [select id,ManagerId from user where id = :UserId];
       if(u.ManagerId == null){
           
          bln = true;
      }
       else{
          ParentUserId.add(u.ManagerId);
          UserId = u.ManagerId;
      }
  
  }
  
    //ID groupId = [select id from Group where Type = 'Organization'].id;
    Id parent;
        if(trigger.isInsert){
   
    List<Test__Share> testShare= new List<Test__Share>();
         for(Test__c t : trigger.new){
            
           parent=t.Id;
          
           for(Integer j=0;j<ParentUserId.size();j++)
           {
               
                //string ob='ts'+coun;
                Test__Share ob= new Test__Share();
                ob.ParentId = parent;
                ob.UserOrGroupId =ParentUserId[j];
               
                system.debug('Id='+ParentUserId[j]);


       
                ob.AccessLevel = 'edit';

                ob.RowCause = Schema.Test__Share.RowCause.Test_Access__c;
                testShare.add(ob);
                //coun++;
                              
           }
        }
       
            if(!testShare.isEmpty())
                insert testShare;
           
       
            // Database.SaveResult[] TestShareInsertResult = Database.insert(testShare,false);
    }
}

    My Test Class:
            @isTest
private class TestShareTrigger {
    static testMethod void testShares() {
       
        List<Test__c> deleteTestData= [select id from Test__c limit 50000];
        if(deleteTestData.size()>0)
            delete deleteTestData;
       
        Set<ID> ids = new Set<ID>();
        List<User> users = new List<User>();
        List<User> updatedusers = new List<User>();
        String pid = [Select id from Profile where Name='Test Reps'].Id;
        for(integer i=1; i<=200; i++){
     
  
      User tuser = new User(  firstname = 'test',
                            lastName = 'Name'+i,
                            email = 'testname'+i+'@email.com',
                            Username = 'testname'+i+'@email.com',
                            EmailEncodingKey = 'ISO-8859-1',
                            Alias = 'test',
                            TimeZoneSidKey = 'America/Los_Angeles',
                            LocaleSidKey = 'en_US',
                            LanguageLocaleKey = 'en_US',
                            ProfileId = pid);
      users.add(tuser);
                           
  }
        insert users;
       
       
      
       
        for(Integer i=0;i<users.size();i++){
                             
            if(i!=199){
                users[i].ManagerId=users[i+1].Id;
                 
            }
           
        }
       update users;
       
   
        //List<User> u = [SELECT Id FROM User where LastName LIKE 'testuse%'];
        Test__c t=new Test__c();
        t.Email__c='test@gmail.com';
        t.Mobile__c='12345678';
        t.OwnerId=users[0].id;
       
        insert t;
       
       
       
        List<Test__Share> testsha = [select id from Test__Share where AccessLevel = 'edit'];
        System.debug('TestShares='+testsha.size());
        System.assert( testsha.size()>1);
       
       
      
       
    }

}

My test case scenario is:
If user1 creates record then it is visible to all the user(ie visible to all 200 user )
and If user200 creates records then it is visible to himself ..

For that how to write the test code??

Thanks in advance
Karthick
We've just purchased Knowledge and I'm in the process of setting it up and have some questions about Knowledge Articles as PDFs when attaching to cases:

1. Is it possible to style the PDF that is created from a case when using the merge field "Articles as PDFs"? If so, where do I find it?

2. The links to other Knowledge Articles don't work in the PDF that are attached to the email when the case. They work when you view the article on our site or in Article Management though.

3. Is there a way to include the Article in the actual email rather than as an attachement? We were able to do this with Solutions but I don't see any other merge fields available for Articles when I'm in the email template. It appears that the "Inline" checkbox that is available when your send an email with an attachment does nothing when it's checked. Any suggestions?
Okay, so I have been working with VF pages for a while now. I understand that ActionRegion is used when you need to render another part of the pageblocksection without having to fill in any required field. So few questions are:

1. Are actionSupport always needed for actionRegion? Why?
2. What is actionSupport? or more specifically when would you use that without actionRegion. Give me a logic. 
3. What is actionFuction? When would you use it and Why vs. using actionRegion or support? 
4. Does actionFuction always need JavaScript and why? As in <script></script> using this. When would you not use that?

I have read and re-read the Salesforce library and trying to differenciate when to use what but fail to understand it. Please if you can, tell me when NOT to use those. I think that would help a lot. 
I have 15 sandboxes.  I'm getting the email below each time the report tries to run.  How can I determine which sand box this is coming from?  I'm afraid I'm going to look at each one.

Thanks.

============================
Sandbox: Scheduled report Pipeline did not complete


The scheduled report Pipeline ran at 8/25/2014 7:01 AM as the running user Bob xxxx. The following error occurred:

The user account that runs the report (the running user) is inactive.

To fix this problem you can either:
1) Reactivate the user - Bob xxxx
2) Update the schedule and change the running user - https://cs16.salesforce.com/00Oa0000008Lfsz?nav=schedule&fromSchedIcon=true
3) Delete the scheduled job. If the running user scheduled a report in his or her personal folder, you cannot edit the schedule; however, if you have "Modify All Data" permission, you can delete the job from the All Scheduled Jobs page: https://cs16.salesforce.com/08e
       

Click this link to access the report:
https://cs16.salesforce.com/00Oa0000008Lfsz.
If you are not currently logged in, salesforce.com prompts you to do so.

Thank you,

salesforce.com
==================================
  • August 25, 2014
  • Like
  • 0
I create large amounts of feeds (via groups) including a pdf-file. Works fine.
I need to delete the old feeds and files permantly with apex in a backgroud-process. I manage to delete the feeds itself

delete [SELECT id FROM CollaborationGroupFeed WHERE xx LIMIT 1000];

and they are gone, but the files stay behind occupiing space and they need to go as well.

Cannnot find the right spot to do this.
Hi guys,
I need a push in the right direction. 
I have a table with a field that contains a code. I'll call this the "code field".
I need to automatically fill another field: I need to calculate a "password" based on that code. So I'll call this the "password field". Every time the "code field" changes, the "password field" needs to change. 
The method to calculate the password requires complex code. In its current form, it's more than 10 pages, with a lot of for-next-things and so on.
So the simple formulae editor will not suffice. I need a Java or C#-like language.
I've looked to Apex and VisualForce the past few days, but I can't get my head around it, I still don't know how to start.
Can someone push me in the right direction?
Another important question: I'm testing this out with a free developer Account. In the development console, I can create new Apex classes and so on.
But in the account I use from my business, I can't create a new Apex class. It's a Group Edition account (we have a few Group Edition accounts). Why is this? 
Thanks a lot in advance,
Leen
Hi Everybody,
          What is Force.com site and site.com  and  their difference

Thanks in advance
Karthick
Hi folks,
          Can anyone tell me what is force.com sites and how to create force.com sites?


Please Help!
Hi

I am brand new to Apex and development, and i have a few questions i hope can be answered. I've created a custom object called "Drift Status". I want to create a VF area where i can show this if its set to "active". Can this be done? If so, how? And if not, what are similar approaches?

Thanks alot.
I have a Visualforce page that acts as a menu to other Visualforce pages. I want to use the rendered attribute to decide whether an <apex:outputLink> is displayed based on the logged in user's Profile permissions. Something like this:

<apex:outputLink value="/apex/myPrivilegedPage" rendered="{!whatDoIPutHere}">My Privileged Page</apex:outputLink>
Hi All,

Create a custom field on case named "Old status" and If Status field(picklist) value is changed then the old value of Status is evaluated into "old Status" Field? How can do this without using Triggers?

Using Workflow, I wrote this

In Rule criteria: ispickval(Status,"ischanged(status)").

and in workflow action: update field--Oldstatus ,and value=Proirvalue(status).

But, I didn't get previous value of status in oldstatus field.

Kindly support and suggest.

Thank you
Hi Everyone,
         Can Anyone tell me the working flow of sales cloud???
Please Help

Want to do pagination on Task object.So far i've implemented inline edit and search box in it.The doc says StandardsetController does not support Task,hence i'm trying to implement it by using Offset.Referring to http://cloudfollowsdotcom.wordpress.com/2012/12/27/soqloffset/ for pagination .How do implement it ? I'm stucked and really pissed off. Experts please help.



 <apex:page standardController="Task" recordSetVar="tasks" extensions="TaskSearchController">
   <apex:enhancedlist type="Activity" height="800" rowsPerPage="50" customizable="False"/>

   <apex:form id="searchForm">
   <apex:PageBlock mode="inlineEdit">      
   <apex:pageblockSection id="searchBlockSection">
      <apex:pageBlockSectionItem id="searchBlockSectionItem">
      <apex:outputLabel >Keyword</apex:outputLabel>
      <apex:panelGroup >
            <apex:inputtext id="searchTextBox" value="{!searchText}">
            </apex:inputtext>
            <apex:commandButton Id="btnSearch" action="{!Search}" rerender="renderBlock" status="status" title="Search" value="Search">                    </apex:commandButton>
        </apex:panelGroup>
    </apex:pageBlockSectionItem>
</apex:pageblockSection>
<apex:actionStatus id="status" startText="Searching... please wait..."/>      
<apex:pageBlocksection id="renderBlock" >
    <apex:pageblocktable value="{!SearchResults}" var="o" rendered="{!NOT(ISNULL(SearchResults))}">
        <apex:outputLink value="/{!o.Id}">{!o.Subject}</apex:outputLink>
        <apex:column value="{!o.Subject}"/>
    </apex:pageblocktable>     
</apex:pageBlocksection>


// apex

public class TaskSearchController
{
   public apexpages.standardController controller{get;set;}
   public Task l;
   public List<Task> searchResults {get; set; }

  public string searchText
  {
   get
   {
     if (searchText==null) searchText = '';
     return searchText;
   }
  set;
   }

public TaskSearchController(ApexPages.StandardController controller)
{
    this.controller = controller;
    this.l = (Task) controller.getRecord();
  }

public PageReference search()
{
  if(SearchResults == null)
  {
    SearchResults = new List<Task>();
  }
else
{
    SearchResults.Clear();
}

  String qry ='Select Id, Subject,Status from Task where Subject like \'%'+searchText+'%\' OR Status like \'%'+searchText+'%\' OR OwnerId like  \'%'+searchText+'%\' Order By Subject,Status';

  SearchResults = Database.query(qry);
  //System.debug(SearchResults);
  return null;
  }
}
Hi,

I am new to VF page and I need to create the following custom report.

for a given account it should show several lists with

Key Contacts
Funds
Opportunities 
all in seperate tables and should be able to export them as PDF and CSV files.

Any help please.

Regards
Sadas.
There are two objects.obj1 and obj2. I am writing trigger on obj1.status is a picklist field on obj1.if status=new in obj1 i can able to select type=prospect in obj2.Here objects are not related.Is it possible with triggers?
I have some old objects from a time when I went through the force.com workbook that are preventing me from using the new release workbook. I want to remove all of my previous work and start over, how can I do that?
Here are my objects:

Products
Serial Numbers (lookup relationship with a single Product)
Contacts (standard object with a lookup relationship with a single Product)

When I make a contact a "Community User", right now, he/she can see ALL Serial Numbers of ALL Products. I want to restrict his/her access so that they can only see Serial Numbers of a single Product (the one why are associated to).

We have a homegrown application that performs authentication\aurthorization via SAML or .net calls. Is it possible to have a site.com website that allows registrations and then authentication by our homegrown applicaiton?
Hello all,
I want to display a text in the Chatter Group Edit page (displayed when clicking the "Group Settings" in a Chatter Group page, or when clicking the "New Group" button in the Groups tab). To do that, I edited a Chatter Group layout found in Setup | Customize | Chatter | Groups | Group layouts, added a Visualforce page that contains the text, and assigned the result layout to all users. However, when I go to a Chatter group edit page, I don't see any changes. Can anyone tell if in their org, the manipulation working, and why in mine I can't see the modifications?

Thanks a lot,

Karen
Hi All,

Problem: I have some account in salesforce, however I need create a web page for these account make opening case. Then I need that the account perform login using the API.

Hello,

We are planning to integrate sales force with Oracle ERP R12, and I am looking any pre-buit standard integration APIs available in EBS R12 to integrate between EBS and SFDC and Apttus

we are looking integration solution using the pre-buit APIs between these applicaitons.

Any doucments or architecture diagrms will be helpful.

Please help me regarding this!!!
scenario is as follows


Create a list custom setting named “Country”.  Create four records of this custom setting:
1.      Name  =  India
2.      Name  =  France
3.      Name  =  Italy
4.      Name  =  USA
Create another list custom setting named “City”. Add a field “Country” of data type  text on this custom setting.

Create following records of this custom setting:

1.      Name =  New Delhi,  Country = India
2.      Name = Mumbai,  Country = India
3.      Name = Pune,  Country = India
4.      Name = Kolkata,  Country = India
5.      Name = Ney York, Country = USA
6.      Name = Miami, Country = USA
7.      Name = Washington DC, Country = USA
8.      Name = Paris, Country = France
9.      Name = Lyon, Country = France
10.   Name = Milan, Country = Italy
11.   Name = Rome, Country = Italy

Create a Visual Force page. This page should display two picklists, one for Country and another for City. Initially city picklist should not display any value; instead it should be dependent upon Country picklist. So when user selects a particular country then City picklist should load all the cities corresponding to the selected country.
Hi,

I can't see the Related List section on my "Compaign Member Layout'.I want to add the 
'Activity History section' of Lead/Contact to Compaign member layout.How can i do that?

Thanks


Hi All,

In VF page I have created a picklist(filter). with the selection of picklist value I need to display particular report with that filtering.

Can any one pls help me.Its very urgent.


Thanks.

I need to update a field on Parent object ... from workflow rule (filed update) child object.

its not working when "Re-evaluate Workflow Rules after Field Change" is not checked...

on setting "Re-evaluate Workflow Rules after Field Change" to checked its giving the below metion error..

Validation Errors While Saving Record(s)
There were custom validation error(s) encountered while saving the affected record(s). The first validation error encountered was "Re-evaluate Workflow Rules after Field Change cannot be specified for a parent field update.".
Click here to return to the previous page.


is there a way to update filed from child to parent object via workflow rule ?
 

New case record creation on button click visualforce page

Hi,

I am having a following requirement for which i need help,

1) I am having a text box (comments) and followed by a button in my visualforce page

2) when i enter the value in the comments and click on the button a new case has to be created and the comments that i have entered should be mapped to the case and case subject is to be "Lead override"



My controller :

public class AF_ScriptController {
 
    public String status {get;set;}
    public Lead_Object__c obj {get; set; }

   /**
   ** Constructor
   **/
   public AF_ScriptController (ApexPages.StandardController controller) {

      String newId = ApexPages.currentPage().getParameters().get('leadId');
      System.debug ('new Id *** :' + newId);

      if (newId != '') {
         obj = [Select Id,Lead_Override_Comments__c,First_Name__c,Last_Name__c,Dealer_Type__c,Products_Dealership__c,F_I_Manager__c,Contracts_Electronically__c,Dealer_Track_RouteOne__c,What_percent_of_inventory_has_a_selling__c,What_percent_of_your_inventory_has_less__c,What_percent_of_your_inventory_is_newer__c,How_many_front_line_ready_units_do_you_c__c,What_are_your_average_monthly_used_vehic__c,Service_Department_on_site__c,Dealership_Retail__c,Dealership_Permanent_Building__c,Dealership_Payed__c,How_many_years_have_you_been_in_business__c,Leadstatus__c, test__c, salutation__c  from Lead_Object__c where id = :newId limit 1];
       
         if (obj.LeadStatus__c == 'Qualified' ) {
            System.debug ('Qualified *** : ' + status);
            status = System.Label.AF_QualifiedScript;
         }
         else {
            status = System.Label.AF_UnqualifiedScript;
            System.debug ('UnQualified *** :' + status);
         }
       
      }

   }

}



Please help me how to do this



I am using 
Thanks in Advance
// Automatically populate a lookup field to the Rival object

on account we have rival_picklist__c and rival__c is a lookup field relation to rival__c custom object
now when we select the picklist value from rival_picklist__c  , it should match that name from rival__c object and  populate that name  in rival__c field

trigger PopulateRival on Account (after insert,after update)
{
  set<id> accid = new set<id>();
  for( account acc: trigger.new)
  {
    accid.add(acc.id);
  }
  
  list<Rival__c> rvl = [select Name__c ,id from Rival__c];
  map<string,id> mapRival  = new map<string,id>();
  for(Rival__c r :rvl)
  {
  mapRival.put(r.Name,r.id);
  }

  list<account> acclist = [select id,Rival_Picklist__c,Rival__c from account where id in: accid];
  list<account> updateaccount = new list<account>();

  for(account a: acclist)
  {
  if(mapRival.containsKey(a.Rival_Picklist__c))
  {
  if(a.Rival__c=null || a.Rival__c!=mapRival(a.Rival_Picklist__c))
  {
  a.Rival__c = mapRival.get(a.Rival_Picklist__c);
  updateaccount.add(a);
  }
  }
  }

update updateaccount;
}

i m able to save the trigger but its not working.
I want to hide the footer but not header from visualforcepage, I know we can do by <apex:page showHeader="false" applyHtmlTag="false" standardStylesheets="false"> but i want the header to be shown.

User-added image
Hi 

I need to invoke sharepoint online webservice from salesforce using Apex class REST API.

Have you anybody work on this approach, please tell/share me the steps or sample code to invoke the webservice using REST API(HTTP request /response).

Also i need to authenticate the external webservice using REST API.

Thanks 
OAuth 2 error - invalid_grant

Hi guys,

Trying to authenticate using OAuth2.
GOT code successfully, but can't get access_token by code. Everytime receives invalid_grant - please see screnshot
What I am doing wrong, please suggest.

invalid grant

To see the screnshot please right-click on it and open in a new window.

Thank you in advance

Hi,

I have a Validation rule set up on Quote. I have overridden the Clone button on Quote with a Visual Force page.

How to induce a logic such that when the user clicks the "Clone" button, the validation rule is bypassed?

I have created a checkbox named "Isclone" but can not figure out how to provide conditions on this.

Thank You

  • September 30, 2014
  • Like
  • 0
I'm trying to put in place a basic trigger for the auto 'assignment of cases' via communities to ensure that they use the default rule & so that I can remove this checkbox "Assign using active assignment rules" from the page layout.

Here's the trigger code, but it doesn't seem to be working. Any ideas?

**********************************************************************
trigger CommunityCaseAssignment on Case (before insert) {
for (Case c: Trigger.new) {
        if (c.Origin == 'Community') {
           Database.DMLOptions dmlOpts = new Database.DMLOptions();
           dmlOpts.assignmentRuleHeader.useDefaultRule = true;
           c.setOptions(dmlOpts);
        }
        }
}

***********************************************************************
Or are there any other creative solutions around this?
Hi,

We currently had a lead lookup field to our custom object. the problem is, when viewing the record, the field displayed concatenated lead name and its account name.
is that a standard display or is there a way to remove the account name in lookup?

Thanks in advance,

ZP