• pramod sharma 15
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 10
    Replies
Here is my simple before delete trigger code: I want to display this custom message from adderror but in the standard page, I'm getting system exception message. Why is my custom adderror message not showing up on my standard contact page?

trigger contactinsertTrigger on Contact (before insert) 
{
     for (Contact c: Trigger.new)
     {
         c.addError('Contacts cannot be added');
     }
}
I need to pull all the subordinate user records based on the current user role who is logged in. How can I programmatically achieve that?
a. how to increase the command button size in VF pages using the standard styles?

For eg:I changes the colour as below but want to change the button size now.

<apex:commandButton action="{!abcd}" value="New" styleClass="buttonStyle" style="background:LightBlue"/>

b. how to show the buttons  in different lines?

It should be as shown as below in VF page:

Button 1
Button 2

Currently it is shown as in VF page : Button1 button 2

Syntax coded in VF page:

<apex:commandButton action="{!Button1}" value="New" styleClass="buttonStyle" style="background:LightBlue"/>
<apex:commandButton action="{!Button2}" value="New" styleClass="buttonStyle" style="background:LightBlue"/>
a. how to increase the command button size in VF pages using the standard styles?

For eg:I changes the colour as below but want to change the button size now.

<apex:commandButton action="{!abcd}" value="New" styleClass="buttonStyle" style="background:LightBlue"/>

b. how to show the buttons  in different lines?

It should be as shown as below in VF page:

Button 1
Button 2

Currently it is shown as in VF page : Button1 button 2

Syntax coded in VF page:

<apex:commandButton action="{!Button1}" value="New" styleClass="buttonStyle" style="background:LightBlue"/>
<apex:commandButton action="{!Button2}" value="New" styleClass="buttonStyle" style="background:LightBlue"/>
How can we change the background of the VF pages with an image? Is there any configuration or simple piece of code that can achieve this?
How can we change the background of the VF pages with an image in an mobile app? Is there any configuration or simple piece of code that can achieve this?

Question: How to bind the value selected from dynamic picklist onto controller. (I'm passing on session date 

In the below code snippet, user selects an session picklist value. Now I want to retrieve the complete session record based on selection. But when I try to assign the 'session' to an Sobject coaching__C, it is saying that its an invalid assignement of string to Sobject. How to use the selected picklist to bind/retrieve the selected session record?

Code Snippet:
public String Session {get;set;}
 
    
    public List<SelectOption> getsessionoptions() 
    {
         List<SelectOption> optionsz =  new List<SelectOption>();  
         list<coaching__C> archive = new list<coaching__c>();    
     archive = [select id,Coaching_Date__c,Coaching_Notes__c,Contact__c from Coaching__c where User__c = :UserInfo.getUserID() and Contact__c = :Subordinate]; 
                    
        for(coaching__c f:archive) {optionsz.add(new system.selectoption(f.id,string.valueof(f.Coaching_Date__c) ));}    
      
         return Optionsz; 
    }
I'm new to Salesforce mobile app developement. I only know that all the VF pages/coding we do on browser will directly reflect on Salesforce 1 app. I got a requirement to develop an mobile app with 3 screens navigating from one screen to another after entering data in each of them and finally press submit button. Also, client has requirement to show specific background on each screen (with client logo, app name, button styles). 

My question : How to change background in the salesforce app and also how to change the input box dimensions as required by client, how to changes the button styles?

Regards
Pramod
I'm new to Salesforce mobile app developement. I only know that all the VF pages/coding we do on browser will directly reflect on Salesforce 1 app. I got a requirement to develop an mobile app with 3 screens navigating from one screen to another after entering data in each of them and finally save submit button. Also, client has requirement to show specific background on each screen (with client logo, app name, button styles).

My question : How to change background in the salesforce app and also how to change the input box dimensions as required by client, how to changes the button styles?

Regards
Pramod
Here is my simple before delete trigger code: I want to display this custom message from adderror but in the standard page, I'm getting system exception message. Why is my custom adderror message not showing up on my standard contact page?

trigger contactinsertTrigger on Contact (before insert) 
{
     for (Contact c: Trigger.new)
     {
         c.addError('Contacts cannot be added');
     }
}
I need to pull all the subordinate user records based on the current user role who is logged in. How can I programmatically achieve that?
a. how to increase the command button size in VF pages using the standard styles?

For eg:I changes the colour as below but want to change the button size now.

<apex:commandButton action="{!abcd}" value="New" styleClass="buttonStyle" style="background:LightBlue"/>

b. how to show the buttons  in different lines?

It should be as shown as below in VF page:

Button 1
Button 2

Currently it is shown as in VF page : Button1 button 2

Syntax coded in VF page:

<apex:commandButton action="{!Button1}" value="New" styleClass="buttonStyle" style="background:LightBlue"/>
<apex:commandButton action="{!Button2}" value="New" styleClass="buttonStyle" style="background:LightBlue"/>
a. how to increase the command button size in VF pages using the standard styles?

For eg:I changes the colour as below but want to change the button size now.

<apex:commandButton action="{!abcd}" value="New" styleClass="buttonStyle" style="background:LightBlue"/>

b. how to show the buttons  in different lines?

It should be as shown as below in VF page:

Button 1
Button 2

Currently it is shown as in VF page : Button1 button 2

Syntax coded in VF page:

<apex:commandButton action="{!Button1}" value="New" styleClass="buttonStyle" style="background:LightBlue"/>
<apex:commandButton action="{!Button2}" value="New" styleClass="buttonStyle" style="background:LightBlue"/>
I'm new to Salesforce mobile app developement. I only know that all the VF pages/coding we do on browser will directly reflect on Salesforce 1 app. I got a requirement to develop an mobile app with 3 screens navigating from one screen to another after entering data in each of them and finally press submit button. Also, client has requirement to show specific background on each screen (with client logo, app name, button styles). 

My question : How to change background in the salesforce app and also how to change the input box dimensions as required by client, how to changes the button styles?

Regards
Pramod

Hi, I want to create a tree view with checkbox option based on the logged in user. When the user logged in , he can see a tree  with him as a root nodes and his subordinates as sub nodes. Then he can chose any user and the user`s Id should be display in bottom. I got a code from the link below

 

http://forceguru.blogspot.in/2011/12/displaying-role-hierarchy-on.html

 

But this returns me a tree from the beginning, not as logged in user.

Thanks.

The addError() behavior in a before delete trigger results in a message on the Home tab:

 

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 .Contacts cannot be deleted

 

 

I want it to stay on the same tab as the delete button and display at the top in red like this

 

                              Error: Invalid Data.
Review all error messages below to correct your data.
                      Contacts cannot be deleted

 

Note that addError() in a before insert trigger does put the message in red at the top (when not specifying a field)

 

Here is my simple before delete trigger code:

 

trigger contactDeleteTrigger on Contact (before delete)
{
     for (Contact c: Trigger.old)
     {
         c.addError('Contacts cannot be deleted');
     }
}



HI ,

 

I have an apex:command button in my visualforce page.Now i want to change the background color of the button by using inline css .But iam not able to change it.If i use external css its working ,but i want to set standardstylesheets=true and change the background color of the button.So please tell me how to change the background color of the apex:command button

 

My code is as follows...

 

<apex:page >
 
 
 <style>
.contentStyle { font-size:12px; }
.buttonStyle { width:100%; background-color:green; text-align:center; padding-top:4px; }
.activeTab {background-color: #B7A752; color:white; background-image:none}
.inactiveTab { background-color: #F3F3EC; color:black; background-image:none}
.NoRecord { font-size:11px;}
</style>

 <apex:form> <apex:commandButton action="{!save}" value="Edit" styleClass="buttonStyle "></apex:commandButton>

 </apex:form>

 
 </apex:page>

 

In this code my command btns background color not getting changed!

 

So please help me out of the issue..

 

                                                                                                                                                                               Thanks and regards,

                                                                                                                                                                                           anu...