• Harpreet On Cloud
  • NEWBIE
  • 163 Points
  • Member since 2012

  • Chatter
    Feed
  • 5
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 42
    Replies

Hello, 
When I create an opportunity, I send a request to an external service that tells me which fields are going to be shown in that opportunity's layout.
Because the fields are dynamically created, different layouts will be created for different opportunities.
The problem is that when I create a new field and add it to the opportunity layout, all opportunity layouts are affected.

I'm aware that I can have several record types and assign different layouts to different profiles, however, I'd like to be able to sign in with my admin account and click on every opportunity and see the different layouts without having to change profile.

Is this possible?

Regards,

Hugo Soares
 

Do you know how I can write a workflow formula for when the  Date_of_Last_Member_Added__c is changed on a specific campaign? The campaign name is "NA - Named Accounts Western Region Prospects"? Or should I use the campaign id?
We mistakenly changed the domain name this morning using the "My Domain " option but now have my name in the URL  (  https://jasonold.my.salesforce.com/setup/ )  when we were trying to get the new company name included.
Is there any way to revert the domain back to the default Salesforce one or one of our choosing?

Regards

Jason 
Hi, I need to add a list of users to a Cusom Label. I then need to reference this label to allow only users in Custom Label the ability to write data into a custom object using a trigger . I'm new to Apex and Salesforce. Please assist. Thanks.

Hi,

 

Can anybody tell me how to pass parameters across pages via the controller.

 

I have the same controller associated with 3 pages.

 

And I want the value I set in the 1st page to be available for display on the 3rd page.

Is it possible to do the same via the controller ?

 

 

Regards,

Lakshmi.

  • July 27, 2012
  • Like
  • 0

Guys, I am little confused. I want to set checkbox on page load in a list of records.

 

I am rendering a list (of Engagement records) on a custom page. The first column of list is a checkbox. This checkbox should be checked on page load if Engagement record has atleast one related Potential record.

 

I tried using inputCheckbox and tried to use selected attribute but it did not work.

I tried using then HTML input checkbox field and tried to use 'checked'

<input id="{!engagement.Id}" value="{!engagement.Id}" type="checkbox" class="checkbox" name="ids" {!IF( ISBLANK(engagement.Potential__r), '', 'checked')}  />

 

 

but VisualForce starts giving error. I am not able to set checkbox on page load. Can anyone provide any clue of how this can be done.

As far as the performance is concerned, it is better to reduve no. of joins in the query by doing a de-normalization. How can we do a de-normalization?

 

Is using a formula of Account field in Contact a sense of de-normalization so that we do not use Account object while writing a query on the Contact object? Are formula fields stored as a data internally and updated as and when the source data gets updated? If no, are roll-up summary fields also calculated at runtime rather than storing them internally?

We have implemented Customer Portal Authenticated Sites User for the current client. We created a custom page that we wanted to be the homepage once the user logs in to the portal. The name of this custom page is "Home Page" We assigned this page as "Default Landing Tab" using "Customize Portal Tab" button. Also for Login too, there is a custom page created called "Login"

This works fine. When we log in to system using custom "Login" page, it does show our landing page - custom "Home Page". When user logs out, he is taken back to the custom "Login" page.

However when user's session is time out due to inactivity, he is shown Salesforce default login page rather than the custom login page created by us. I see that the url to which it is redirected is:

http://na8.salesforce.com/secur/login_portal.jsp?orgId=00DM0000000Cswa&portalId=060M0000000X8c3&startURL=%2Fvisualforce%2Fsession

Now when user enters his username and password, he is redirected to the Salesforce Default Home page rather than my custom "Home Page".

 

I see that this is due to presence of "startURL" parameter in the URL. Is there a way I can get this parameter removed from the URL when there is a session timeout.

 

Hi All,

Here is the change I am looking to make:

If fieldA (SortType_C) from CustomObject_C =  BLANK then change value of SortType_C to "Other"

I am a new administrator and learning fast, I managed to access the developer console but I am new to DML.

Can anyone help me with the code?

Thanks,

Dave The Rave
Hi,

   Is there a way to by pass opportunity valdiation during lead conversion. Please suggest. 

Thanks
Sudhir
  • May 25, 2018
  • Like
  • 0

My Question is this

I have a sObject name "object1", having one profile name "profile1" which have all permitionss (create, edit, delete, view, viewAll, modifyAll) for sObject (object1), now I assigned that profile to User1, user2. Now I wants to assign same profile (profile1) to user3, but the condition is this user3 only have a create permition, how would I achive this. I know by permition set we can add new permitions but we can not degrade permitions.

Please reply

Hello, 
When I create an opportunity, I send a request to an external service that tells me which fields are going to be shown in that opportunity's layout.
Because the fields are dynamically created, different layouts will be created for different opportunities.
The problem is that when I create a new field and add it to the opportunity layout, all opportunity layouts are affected.

I'm aware that I can have several record types and assign different layouts to different profiles, however, I'd like to be able to sign in with my admin account and click on every opportunity and see the different layouts without having to change profile.

Is this possible?

Regards,

Hugo Soares
 

GIVEN: as a Sales rep
WHEN: I am log in Salesforce
THEN my opportunity is in Contract Signed stage
THEN my opportunity cannot be manually edited anymore
PS - will be locked for manual edition but system integration will continues updating opportunity.

How we can acheive this requirement?
i have two vfpages. In one vfpage i have some pageblocks on each pageblock i have pageblocksections in one of the pageblock i need to add another vfpage pageblocksections. i have tried <apex:include> but it does not work cause of nested form tag. on each vfpage i have standardcontroller and extensions. when i tried to use code in the first page it is referencing the second vfpage standardcontroller name but we can not use two standardcontrollers in same vfpage. please help me it would be saved me.

Thanks.
Hi All,

  Trying to construct the data table dynamically using visualforce remoting with jquery data table.
Getting the table with empty values.
The following is the code and output. Please help me in getting this done. 
 
<apex:page controller="AccountRemoter"  sidebar="false"  docType="html-5.0" >
    
    <head>
        <link rel="stylesheet" href="https://cdn.datatables.net/1.10.12/css/jquery.dataTables.min.css"/>
        
        <apex:includeScript value="{!$Resource.Jquery2}"/>
        <script src="https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script>
        
        </head>
        
        <script type="text/javascript">
            $ = jQuery.noConflict();
        function getRemoteAccount() {
            
            Visualforce.remoting.Manager.invokeAction(
                '{!$RemoteAction.AccountRemoter.getAccounts}',
                function(result, event){
                    console.log(result);
                    
                    $('#example').DataTable( {
                        data: result,
                        columns: [
                            { title: "Id" },
                            { title: "Name" }
                            
                        ]
                    } );
                }, 
                {escape: true}
            );
        }
        </script>
        <button onclick="getRemoteAccount()">Get Account</button>
        <table id="example" class="display" cellspacing="0" width="100%">
            
            
        </table>
        
    </apex:page>
 
global with sharing class AccountRemoter {

    public String accountName { get; set; }
    public static Account account { get; set; }
    public AccountRemoter() { } // empty constructor
    
   
    @RemoteAction
    global static List<Account> getAccounts( ) {
        List<Account> accnts= [SELECT Id, Name 
                   FROM Account  limit 5];
        return accnts;
    }
}

Output with empty data

Any help is really appreaciated . Thanks in advance.

Regards,
Naveen
scenario: in an object there are two fields called field1 and field2 and i have 100000 records,out of 70000 record values are equal in field1 and field2.now dispaly those 70000 records on visualforce page.
Do you know how I can write a workflow formula for when the  Date_of_Last_Member_Added__c is changed on a specific campaign? The campaign name is "NA - Named Accounts Western Region Prospects"? Or should I use the campaign id?
We mistakenly changed the domain name this morning using the "My Domain " option but now have my name in the URL  (  https://jasonold.my.salesforce.com/setup/ )  when we were trying to get the new company name included.
Is there any way to revert the domain back to the default Salesforce one or one of our choosing?

Regards

Jason 
Hi Experts,

I want to know what are impact of converting from Picklist field  to Lookup field in salesforce. Please let me know your suggestion.

Thank,
Vijay
Hi, 

I want to change a field from  PICKLIST field to LookUp field..  Is it Possible? 
Hi,

I have a vf page where I am dynamically rendering opportunity Line Items. There is a limit of 250 line items can be visible at a time. For rest one link is there like next. To select all the records at a time I have created a checkbox, onclick it will select all the records. But it works for 250 records. If there are more than 250 records, then I have to press next link , the page refreshes and checkboxes for new records don't get ticked automatically. Again I have to tick select all checkbox. Same proble occurs also when I press previous link.
How is it possible to select all records at a time and retain the same even page refresshes. Any idea.

User-added image

Thanks.
Hi, I need to add a list of users to a Cusom Label. I then need to reference this label to allow only users in Custom Label the ability to write data into a custom object using a trigger . I'm new to Apex and Salesforce. Please assist. Thanks.
i want to same multiple records at one click im have following problems

1 dublicate records are creating
2 all records is save with same value


apex code

<apex:page controller="sample1">
    <apex:form >
        <apex:pageBlock >
            <apex:pageBlockTable value="{!task}" var="p">
                <apex:column headerValue="values">
                    <apex:outputText value="{!p}">
                    </apex:outputText>
                </apex:column>
                
                <apex:column headerValue="15%">
                    <apex:inputText value="{!a}" />
                </apex:column>
                
                 <apex:column headerValue="20%">
                     <apex:inputtext value="{!b}"/>
                </apex:column>
                
                 <apex:column headerValue="30%">
                     <apex:inputtext value="{!c}"/>
                </apex:column>
                
            </apex:pageBlockTable>
            
             <apex:pageBlockButtons >
                 <apex:commandButton value="save" action="{!save}"/>
             </apex:pageBlockButtons>
           
          
        </apex:pageBlock>
    </apex:form>
</apex:page>


controller


public class sample1 
{

   
    
    List<String> s=new List<String>();
    public String x{get;set;}
    public Integer a{get;set;}
    public Integer b{get;set;}
    public Integer c{get;set;}
    
        public List<String> getTask()
        {
            List<SelectOption> options = new List<SelectOption>();
            Schema.DescribeFieldResult fieldResult = Account.task__c.getDescribe();
            List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();
            
            for( Schema.PicklistEntry f : ple)
               {
                  //options.add(new SelectOption(f.getLabel(), f.getValue()));
                  //System.debug(f.getLabel());
                  s.add(f.getValue());
               }
             
            return s;
        }
    
     public void save() 
     {
          for(String x:s)
              {
                  task__c t = new task__c(Name=x,X15__c=a,X20__c=b,X30__c=c);
                  
                try
                   {
                       insert t;
                   }
              
               catch(Exception e)
                  {
                      ApexPages.addMessages(e);
                  }
              }
          
                       
     }
    
    
 
}