• subrat_ray
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 4
    Replies

I have a requirement where, on a VF page I am displaying different fields of an Account record.

There should be checkbox before each field. On checking it, the corresponding

field will be Editable.

There will be a submit button on clicking of which the record will be updated.

 

vf page:

<apex:page controller="SupplierUpdate">
    <apex:form >
    
        
        <apex:pageBlock id="theBlock">
                
            <apex:pageBlockSection columns="2">
                <apex:inputField value="{!acc.Trading_Title__c}" />
                <apex:inputField value="{!acc.Collection_Address__c}" />
                <apex:inputField value="{!acc.Account_Name__c}" />
                <apex:inputField value="{!acc.Collection_Street__c}" />
                <apex:inputField value="{!acc.Website}" />
                <apex:inputField value="{!acc.Collection_Post_Code__c}" />
                <apex:inputField value="{!acc.CPH_Holding_No__c}" />
                <apex:inputField value="{!acc.Correspondence_Address__c}" />
                <apex:inputField value="{!acc.Depot__c}" />
                <apex:inputField value="{!acc.Correspondence_Street__c}" />              
                <apex:inputField value="{!acc.Phone}" />
                <apex:inputField value="{!acc.Corresondence_City__c}" />
                <apex:inputField value="{!acc.Fax}" />
                <apex:inputField value="{!acc.Correspondence_Postcode__c}" />
                
                <apex:commandButton action="{!submit}" value="Submit" />
                
            </apex:pageBlockSection>
        </apex:pageBlock>
        
        
        </apex:form>    
</apex:page>

 

And the controller(incomplete) is

public class SupplierUpdate {
    
    public Account acc{get;set;}
    
    public SupplierUpdate (){
        acc = new Account();
        SupplierUpdataion ();           
    }
    
    public void SupplierUpdatation (){
        try{
            //getting info of logged-in user
            User userLatest=[select id,profile.id,contactId,profile.name from User where id=:UserInfo.getUserId()];
                
                //getting the account associated with the logged-in user
                acc=[select id,,Name,Account_Name__c,Phone,Fax,Website,Collection_Address__c,Collection_City__c,Collection_Street__c,
            Collection_Country__c,Collection_County__c,Collection_Post_Code__c,Trading_Title__c,
                        from account where owner.Id = :userLatest.Id];
            }

        catch(Exception e){
            apexpages.addmessage(new apexpages.message(apexpages.severity.info,'Contact Your System Admin.'));
        }  
    }
    
    public pageReference submit(){      
    update acc;
        return null;
    }
  }

 

Thanks in advance.

Hi All,

 

I have two fields of currency type.

Requirement is, when I enter any value in the first field, then it should automatically be

populated in the second as the default value.

If I change the value in the second field, it should hold the latest

value otherwise the default value (same as first).

 

Thanks,

Subrat

 

I have a requirement where, on a VF page I am displaying different fields of an Account record.

There should be checkbox before each field. On checking it, the corresponding

field will be Editable.

There will be a submit button on clicking of which the record will be updated.

 

vf page:

<apex:page controller="SupplierUpdate">
    <apex:form >
    
        
        <apex:pageBlock id="theBlock">
                
            <apex:pageBlockSection columns="2">
                <apex:inputField value="{!acc.Trading_Title__c}" />
                <apex:inputField value="{!acc.Collection_Address__c}" />
                <apex:inputField value="{!acc.Account_Name__c}" />
                <apex:inputField value="{!acc.Collection_Street__c}" />
                <apex:inputField value="{!acc.Website}" />
                <apex:inputField value="{!acc.Collection_Post_Code__c}" />
                <apex:inputField value="{!acc.CPH_Holding_No__c}" />
                <apex:inputField value="{!acc.Correspondence_Address__c}" />
                <apex:inputField value="{!acc.Depot__c}" />
                <apex:inputField value="{!acc.Correspondence_Street__c}" />              
                <apex:inputField value="{!acc.Phone}" />
                <apex:inputField value="{!acc.Corresondence_City__c}" />
                <apex:inputField value="{!acc.Fax}" />
                <apex:inputField value="{!acc.Correspondence_Postcode__c}" />
                
                <apex:commandButton action="{!submit}" value="Submit" />
                
            </apex:pageBlockSection>
        </apex:pageBlock>
        
        
        </apex:form>    
</apex:page>

 

And the controller(incomplete) is

public class SupplierUpdate {
    
    public Account acc{get;set;}
    
    public SupplierUpdate (){
        acc = new Account();
        SupplierUpdataion ();           
    }
    
    public void SupplierUpdatation (){
        try{
            //getting info of logged-in user
            User userLatest=[select id,profile.id,contactId,profile.name from User where id=:UserInfo.getUserId()];
                
                //getting the account associated with the logged-in user
                acc=[select id,,Name,Account_Name__c,Phone,Fax,Website,Collection_Address__c,Collection_City__c,Collection_Street__c,
            Collection_Country__c,Collection_County__c,Collection_Post_Code__c,Trading_Title__c,
                        from account where owner.Id = :userLatest.Id];
            }

        catch(Exception e){
            apexpages.addmessage(new apexpages.message(apexpages.severity.info,'Contact Your System Admin.'));
        }  
    }
    
    public pageReference submit(){      
    update acc;
        return null;
    }
  }

 

Thanks in advance.

Hi All,

 

I have two fields of currency type.

Requirement is, when I enter any value in the first field, then it should automatically be

populated in the second as the default value.

If I change the value in the second field, it should hold the latest

value otherwise the default value (same as first).

 

Thanks,

Subrat

 

Hi,

 

I need to display a visualforce page containing all input fields for email purpose.

likeTO,CC,BCC

Email body and some buttons, just like outlook window functionality.

 

In email body, i have to use spell checker component and text format component as we use in outlook.

Or just like writing a message on discussion boards, we are getting this window which allows us to use Rich text,html or preview format.It also allows us to check the spelling using "Spell check".

Is this possible in visualforce page?

 

Does anybody know, how it can be achieved?

Does active  object provide those features?

 

Your help will be highly appreciated.

 

 

Hi,

 

Here is a requirement to remove the button "Submit for Approval" from the Approval History related history list from a case page layout once the case is approved.

 

I didnt find any settings to remove  the button in the page layout properties.

 

Please share your ideas if  you had come across this requirement with any workarounds.

 

Thanks in advance,

Pavan