• AhmedPot
  • NEWBIE
  • 165 Points
  • Member since 2010

  • Chatter
    Feed
  • 6
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 62
    Replies

Hi,

 

I am about to be responsible for an integration project that will entail Web Services (Sending from SFDC to another system).  We do not want force the users to enter all required data that is needed by the other system when they first enter the data into SFDC.  We want a button on the opportunity that will be called 'Submit To...'

 

When the button is clicked we want to have validation done and if it passes build the necessary parameters to feed the API function that sends the data to the other system.

 

Can some help me with the building blocks for such a task.  For example.  do I simply create a class and a function in side that class that does all the nececessary validation on the opportunity and associated data (account, contact roles, etc) and if all is good, build the necessary API call and call it?

 

Is there typically a suggested building block for something like this? If so could you provide a basic outline.

What would the code look like in the button in order to call a class/function if that is the approach?

 

How can I use ONE Visualforce page to override both VIEW and EDIT actions on a custom object?

 

I have a page written that will display an inputField in edit mode, and an outputField component in view mode -- but I can't find a way to determine if I'm in edit mode when the page is hit as a result of the edit action redirect. I've checked HTTP headers, hoping to find something like "/e?..." but there's nothing I can see that would be useful.

Hi,

 

I have 2 picklists

 

 

 

 

Practice

PracticeA
PracticeB

Departments
Dep1
Dep2
Dep3
 

 

when i select PracticeA then only Dep1 and DEp2 should be available in the Department picklist and when PracticeB is selected then Dep3 should only be in the picklist.

 

Is this possible?

 

Thanks

 

Prady

  • March 17, 2011
  • Like
  • 0

Anyone know if VF Email templates run as "With Sharing"? I have a VF template that sends emails to contacts ie. recipientType="Contact"

I use Apex Email to send the email and set the "Target Object Ids" to the Contact Ids. However I get an "System.EmailException: SendEmail failed. First exception on row 0; first error: INVALID_CROSS_REFERENCE_KEY, invalid cross reference id: []".

Contact is "Public Read Only" but the Contact is not associated with an "Account".

If I use a regular email HTML template, and send an email using Apex Email, it goes through as expected.

I want to place a custom button in a page layout, that when I click it, it does some work through apex and then returns the PageReference to take me to another page.  The thing I don't know is, do I create a Visualforce Page that only has a single command button on it, and the controller that goes with it, or is there something else I need to do?  Even a link to put me in the right direction would be sufficient for me.

 

I think my main problem is that, when I try to select the Content and choose my page, its not there.  so far for my page I have: (I have also tried a few variations of this, and so I must be doing something wrong...)

 

<apex:page standardController="Case">
  <apex:form >
    <apex:commandButton action="{!save}" />
  </apex:form>
</apex:page>

Hi,

 

I have a tab "Document Management" and i have associated a VF Login page to this tab.... when user logs in here i call a jsp and i get a  cookie back in my response, which i have to embed in my next requests..

 

When user logs in successfully, i am redirecting to a new VF INDEX page in the same tab.... so i am passin the cookie parameters in the query string to the second page... here i dont have any problems...

 

But if i visit a new tab, say accounts tab or contacts tab and then return to my Document Management tab, the first Login page gets displayed..... I need to know somehow that user has already logged in before, so i have to redirect the user directly to the INDEX page... so where can i put the cookie values that i got in my first login request? is there any session like we have in java or .net that will be persisted always....

 

Also i have a small pageblock in the contacts and accounts detail page.. .so when user goes to contacts tab and selects a contact there, i should know whether the user has already logged in Document management tab, if he has logged in i should display the documents in that paeg block, else i have to ask user to login there....

 

I hope i have explained properly... i want to persist some details like whether user has logged in and his id all those things in session kind of thing...

 

Please help me and let me know how i can achieve this...

 

Thanks and Regards,

Rani.....

  • March 08, 2011
  • Like
  • 0
Once a managed package is released, we have to perform several manual steps such as update picklist values, add field to layout, update field level security etc. And there are around 100's of subscriber orgs to be updated. So I wanted to automate it.

I have created an Apex class which would update the metadata API of subscriber orgs. The idea was to run this script asynchronously (using either @future or batch) as post install class. However, it doesn't work as there is no session available with package install user as well as no session available in scheduled or batch job.

The other obvious alternate is to allow admins of subscriber org to click a link or button which would fire the Apex and perform the update.

Is there any way of automating this activity after package is installed?

Thanks

 Hi,

 

Overview:

I'm displaying the chart if there are values to plot on it for each year. Otherwise, a message is displayed as no data. 

 

Issue:

Chart is re rendered properly when there are values to plot for selected year. Also, when there are no values to plot, appropriate message is displayed and chart is hidden. Now once I select the year which has values to plot, chart section is rendered to true but the chart doesn't show up in the screen. Just blank page comes up.

 

Below is the page code,

 

<apex:page controller="PaymentGraphController" sidebar="false">
<apex:form >
<apex:pageBlock id="PB" >
<apex:chart height="400" width="700" data="{!paymentDataList}" rendered="{!showData}">
<apex:legend position="right"/>
<apex:axis type="Numeric" position="left" fields="NumberOfPayments"
title="Payments(Count)" grid="true"/>
<apex:axis type="Numeric" position="right" fields="totalAmount"
title="Total Amount"/>
<apex:axis type="Category" position="bottom" fields="Calendarmonth"
title="Month of the Year">
</apex:axis>

<apex:lineSeries title="Proceeds" axis="left" xField="Calendarmonth" yField="NumberOfPayments"
markerType="cross" markerSize="4" markerFill="#FF0000"/>
<apex:lineSeries title="Closed-Lost" axis="right" xField="Calendarmonth" yField="totalAmount"
markerType="circle" markerSize="4" markerFill="#8E35EF" />
</apex:chart>

<apex:outputLabel rendered="{!(!showData)}"><b>No payment for {!year}</b></apex:outputLabel>
<apex:outputLabel value="Payment Year: "></apex:outputLabel>
<apex:selectList value="{!year}" size="1" >
<apex:selectOptions value="{!Years}"/>
<apex:actionSupport event="onchange" rerender="PB" action="{!refreshByYear}"/>
</apex:selectList>
</apex:pageBlock>

</apex:form>
</apex:page>

 

Am I missing something here? Please suggest some workaround.

 

Thanks.

Hi,

 

I was checking out html5 in visualforce pages. Visualforce is not recognising Opendatabase command.

 

<apex:page showHeader="false" sidebar="false" standardStylesheets="false" docType="html-5.0" >

......

<script>

var db = openDatabase ("Test", "1.0", "Test", 65535);

........

</script>

 

Do we have to include some supporting js file or it is not supported at all.

 

Thanks,

Ahmed

 

 

 

Hi,

 

I want to insert error details in Custom setting. I have called future method from tigger to perform insert operation followed by trigger.addError. But nothing seem to be inserted in the custom setting.

 

Below are excerpt from Trigger

 

 

trigger AccountSoftValidation on Account (before insert) {

   for(Account acc: [select name from Account where name like:AccountName and Mailing_Local_Country__c=: Trigger.new[0].Mailing_Local_Country__c
   and Mailing_Local_City__c=:Trigger.new[0].Mailing_Local_City__c ]){
    recordsFound = true;
    DuplicateAccountController.insertDuplicateRecords(); // calling future method
    //ErrorMessage += 'Account '+acc.name + '--';
    count +=1;
   }
   ErrorMessage += ''+count+' duplicate Accounts found with same Name, City and Country. ';
   ErrorMessage += 'Please click on link on left side under Helpful Section to view details.';
   if(recordsFound){
        
    Trigger.new[0].addError(ErrorMessage);
   }
  }
 //}
}

 

Future method
 @Future(callout=true)
 public static void insertDuplicateRecords(){
  List<Duplicate_Records__c> duplicateRecords = Duplicate_Records__c.getall().values();
  Database.delete(duplicateRecords,false);
  Duplicate_Records__c dup = new Duplicate_Records__c(name=userInfo.getUserId()+'Account duplicate', User_Id__c = userInfo.getUserId(),
             Type__c = 'Account', status__c = 'duplicate');
  System.debug('dup---'+dup);
  Database.insert(dup,false);
  System.debug('dup---'+dup);
 }

 

 

Is there some way of inserting records in custom object or custom setting while using addError method in trigger?

 

Thanks,

Ahmed

Hi,

 

We are trying to check, if there is any way to send attachment files to external system. WSDL callouts dont support it. Is there any way or workaround to achieve it?

 

Thanks,

Ahmed

Hi,

 

Need some help on importing word documents related to an article. I was reading Salesforce help for the same. They have mentioned that we can create custom file field which can be used to upload and attach file to an article. But I'm not able to see an option to create field with data type as file. Has any one worked on importing word docs with an article or suggest some way out?

 

Thanks,

Ahmed

Hi,

 

Can we get last modified date for any field via describe call or is it getting stored in some sObject. I need to track last modified by user for any sobject.

 

Thanks,

Ahmed

Hi,

 

when we schedule any report, we get reports data in email but in few of our report the tabuar format is extremely distorted. Is there any way, we can may be customize the template for scheduled report emails. I couldn't find any myself. Is there any workaround to it, if any?

 

Thanks,

Ahmed

Hi,

I'm getting apex:inputFile can not be used in conjunction with an action component, apex:commandButton or apex:commandLink that specifies a rerender or oncomplete attribute.error as I have many other rerender attributes for other components.

 

It seems that we can't use apex:input  file and rerender methods together. But is there any work around for this.

I also got to know that we can use hidden iframe to achieve it but not sure how it can be done

 

Thanks,

Ahmed

I have used below given code

<apex:page contentType="application/msWord">
  <!-- Begin Default Content REMOVE THIS -->
  <h1>Congratulations</h1>
  This is your new Page
  <!-- End Default Content REMOVE THIS -->
</apex:page>

 

When I view the page, open/save dialog box open to view the excel. I want to display the doc in browser itself like PDF files are displayed.

 

Any idea how to prevent this open/save dialog box and diaply excel inside the browser?

Hi,

 

I want to display uploaded PDF/word document inside a VF page. I mean user should be able toview the contents of the attached pdf/word file, when they are viewing the page.

 

Is it possible. Any pointers on how to achieve this?

Hi,

 

I'm getting Max Size of insert update call is 200 error when I'm trying to insert an array of type sObject4 with size of array more than 200.

 

    Dim so(300) As SObject4
    i = 19
  cntVal = 0
  While Cells(i, 1) <> ""    
    Set so(cntVal) = objSession.CreateObject("Fleet_List__c")

    so(cntVal)("Owner_Name__c") = Sheet1.Cells(i, 3).Value
    so(cntVal)("Asset_Name__c") = Sheet1.Cells(i, 4).Value

    cntVal = cntVal + 1
  i = i + 1
  Wend

    objSession.Create so, False   'commit the Sobject
    objSession.Refresh so, False

 

If size of array is set to 200, then it works fine.

 

Is there  any other better way to insert/update more than 200 records.

 

Awaiting any help on this.

 

Thanks,

Ahmed

 

My requirement is that I'm creating dynamic DML .Now I want to retrieve the result from the query but I don't know what the field names would be.

The question is, what do I do if I don't know the column names?

Imagine that I'm given a SOQL string to execute, and I don't know what the field names are.

I dont want to do Object.fieldname directly as Query may have different fieldname

 

for ex:

 

Contact c = [select name from Contact limit1];

 

can't call

c.get('name') or c.name

 

because I don't know what the name of the field is.

 

Any workaround wherein I can get the data without entering the column name?

 

Awaiting any replies.

I have a lightning component from which I am retrieving contact records onto an aura:attribute which is as follows:
<aura:attribute name="data" type="Contact[]"/>    

after retrieving the result from the controller I am printing it on component using aura:iteration which is as follows:

<aura:iteration items="{!v.data}" var="data">        
            <tr>
                <td><a href="{! '#/sObject/' + data.Id +'/view'}" onmouseover="{!c.mouseOver}">
                    <p>{!data.Name}</p></a></td>
                <td><a href="{! '#/sObject/' + data.Id +'/view'}">
                    <p>{!data.Phone}</p></a></td>
                <td><a href="{! '#/sObject/' + data.Id +'/view'}">
                    <p>{!data.CreatedDate}</p></a></td>                
            </tr>
        </aura:iteration>

As you can see on the first <td> tag I have used mouseover from where I am calling a js controller method ...

I want that method to be looked like this:

mouseOver : function(component, data){
        console.log('data = '+ data);
    }

now the 'data' argument I want to pass while the method is called i.e., mouse is hovered on that <td> and the data should be the name i.e., "{!data.name}"

where 'data' is the 'var' for the aura:iteration..

So how to send argument to js controller from component while calling from there only....

please help me its urgent

Hello,

 

It was a first attempt to read one table in Salesforce.com and write an output file using Informatica 9.0.1 Hotfix2, and I got an error as follows.

 

ERROR SFDC_31121 [ERROR] Valid PowerExchange for Salesforce.com license key is not found.
ERROR SDKS_38007 Error occurred during [initializing] reader plug-in #310600.
ERROR SDKS_38003 Plug-in #310600's method PPluginDriver::init() failed.
INFO SDKS_38025 Plug-in 310600 deinitialized and unloaded with status [-1].
ERROR TM_6006 Error initializing DTM for session [s_TEST_m].

 

Any comments would be great !!

 

Thanks,

Martin


 

Hi,

 

I want to insert error details in Custom setting. I have called future method from tigger to perform insert operation followed by trigger.addError. But nothing seem to be inserted in the custom setting.

 

Below are excerpt from Trigger

 

 

trigger AccountSoftValidation on Account (before insert) {

   for(Account acc: [select name from Account where name like:AccountName and Mailing_Local_Country__c=: Trigger.new[0].Mailing_Local_Country__c
   and Mailing_Local_City__c=:Trigger.new[0].Mailing_Local_City__c ]){
    recordsFound = true;
    DuplicateAccountController.insertDuplicateRecords(); // calling future method
    //ErrorMessage += 'Account '+acc.name + '--';
    count +=1;
   }
   ErrorMessage += ''+count+' duplicate Accounts found with same Name, City and Country. ';
   ErrorMessage += 'Please click on link on left side under Helpful Section to view details.';
   if(recordsFound){
        
    Trigger.new[0].addError(ErrorMessage);
   }
  }
 //}
}

 

Future method
 @Future(callout=true)
 public static void insertDuplicateRecords(){
  List<Duplicate_Records__c> duplicateRecords = Duplicate_Records__c.getall().values();
  Database.delete(duplicateRecords,false);
  Duplicate_Records__c dup = new Duplicate_Records__c(name=userInfo.getUserId()+'Account duplicate', User_Id__c = userInfo.getUserId(),
             Type__c = 'Account', status__c = 'duplicate');
  System.debug('dup---'+dup);
  Database.insert(dup,false);
  System.debug('dup---'+dup);
 }

 

 

Is there some way of inserting records in custom object or custom setting while using addError method in trigger?

 

Thanks,

Ahmed

Is the Object field while creating a new custom setting related to the objects that are already created..........

 

I'm getting the error "Return type of an Apex action method must be a PageReference. Found: core.apexpages.el.ApexELResolver$VisualforceArrayList"

 

What is the issue?

 

 

/**Visual page **/

 

<apex:page standardController="Applicant__c" recordSetVar="applicant" extensions="view">
  <apex:form >
      <apex:pageBlock >
          <apex:outputLabel value="Status :" for="status"/>
          <apex:inputField id="status" value="{!Applicant__c.Status__c}">
          <apex:actionSupport event="onchange" action="{!getApplicantByStatus}" reRender="view"/>
              <apex:param name="para" value="{!Applicant__c.Status__c}" assignTo="{!para}"/>
             
            
          </apex:inputField>
      
      </apex:pageBlock>
       <apex:pageBlock >
           <apex:panelgroup id="view">
              <apex:pageBlockTable id="viewApplicant" value="{!applicantByStatus}" var="app">
                  <apex:column headerValue="Applicant ID" value="{!app.Name}">
                              
                  </apex:column>
                  <!-- <apex:column headerValue="Applicant Name" value="{!app.Name__c}">
              
                  </apex:column>-->
              </apex:pageBlockTable>
           </apex:panelgroup>
      </apex:pageBlock> 
      
  </apex:form>
</apex:page>

 /**Controller code**/

 

public class view {

    public Applicant__c applicant;
    public List<Applicant__c> applicantByStatus {get;set;}
    private ApexPages.StandardSetController controller;
   
    public List<String> applicantNameByStatus{get;set;}
    
    public String para{
        get;
        
        set{
           para=value;
        
        }
    }
    
    public List<String> displayFields {
        get; private set;
    }
    
    public view(ApexPages.StandardSetController controller) {
        this.applicant=(Applicant__c)controller.getRecord();
        //this.controller = controller;
    }
    
    public List<Applicant__C> getApplicantByStatus(){
        
         applicantByStatus=new List<Applicant__c>();
         applicantByStatus=[SELECT Name,Name__c,Status__c,Interview_Date_Time__c FROM Applicant__c WHERE Status__c =:para];
         
         if(applicantByStatus==null){
             System.Debug('APPLICANT STATUS IS NULL');
         }
         for(Applicant__c app:applicantByStatus){
             String name=app.Name__c;
             System.Debug('CHECK :: '+app.Name__c);
             applicantNameByStatus.add('app.Name__c');
         }
         
         //applicantNameByStatus.add('Chamil');
          //applicantNameByStatus.add('madusanka');
          // applicantNameByStatus.add('applicant1');
         
         return applicantByStatus;
    } 
}

 

 

 

Hi,

 

 

I want to send pdf as email attachment which is generated  from visualforce page   .I created a button called EmailReceipt .When i click that button it will automatically attach that pdf document and send to that person's mailid which we are capturing from account.How is it possible?

Thanks

  • April 07, 2011
  • Like
  • 0

Hello, I wrote one class and one trigger for process. If someone change the Quote status to 'accepted', the opportunities stage change to 'Closed Won' automaticly. But my codes has some problem when it running. Can anyone help me?

 

Class,

 

public with sharing class Stagechange {
  
      public static void Stagech(List<Quote> myQuote){
      
      for(Quote st1 :myQuote){
        if(st1.Status ==''accepted'){
          
                  
          Opportunity a01 = new Opportunity ();
          a01.AccountId = st1.Id;
          a01.Stagename = 'Closed Won';

         update a01;  

          
        }
        
      }
      
    }
    
}

 

 

Trigger,

 

trigger test on Quote (after update) {
  
    if(Trigger.isUpdate){
      
       List<Quote> st = trigger.new;
       Stagechange.Stagech(st);        

        
    }
}

 

 

Hello Community!

 

I'm encountering the problem that I need to create on every org with my app two dummy users as a placeholder. Since I got a first-start-apex-controller I would like to integrate the creation of User in it. But I can't use the User-Object because of read-only-permission, as Eclipse says to me. 

So does anyone know how to do this?

 

Thanks a lot and Best Regards

 

Nisse

Good day,

 

Anyone have idea how can i get the standard controller object name from my controller ? meaning if my  VF page have standardcontroller = "Account" , then in my controller will able to recognise Account as Standard controller object.

 

Reason of doing that is i have multiple page which have different standard controller in respective page but they have suppose in same behaviour.

 

ie : 

 

 

Mycontroller (ApexPages.StandardController sc){
// how can i know and get dynamically on standard controller object like "Account, Contact..." ?
}

 

Thanks in advance !

  • April 07, 2011
  • Like
  • 0

Hi i wrote a trigger its hiting govener limit for soql query limi101 so can any one hlp me

 

trigger ProductInsert on Product2 (after insert)
{
    //declarations 
    PricebookEntry[] newPBEntry = new PricebookEntry[0];
   
    //get the active standard pricebook
    Pricebook2 standardPB = [select id from pricebook2 where isstandard = true and isactive = true limit 1];
   
    //  create a list of the new productids
    Set<Id> pIds = new Set<Id>();
        for(Product2 pId:Trigger.new)
    {
        pIds.add(pId.Id);      
    } 
   
    //existing pb map, this is for when a record is cloned, it will also clone the pb and we dont need to create it
    Map<Id, PricebookEntry> existingPBMap = new Map<Id, PricebookEntry>();
    for(PricebookEntry ePB:[select id, Product2Id from PricebookEntry where Pricebook2Id = :standardPB.Id
            and Product2Id in :pIds])
    {
            existingPBMap.put(ePB.Product2Id, ePB);
    }
       
   
    //loop through products
    for(Product2 p:Trigger.new)
    {
        if(existingPBMap.get(p.Id) == null)
        {
            PricebookEntry pb = new PricebookEntry();
            pb.UnitPrice = 0;          
            pb.Product2Id = p.Id;
            pb.Pricebook2Id = standardPB.Id;
            pb.IsActive = true;
            newPBEntry.add(pb);
        }
    }
   
    //create the pricebookentry records
    insert newPBEntry;
}

 

in red color soql query is hiting a limit can any one plz help me

 

Thanks

Hi,

 

Can we get last modified date for any field via describe call or is it getting stored in some sObject. I need to track last modified by user for any sobject.

 

Thanks,

Ahmed

I have a simple trigger on Leads that needs to know if the Owner is a User or a Queue.

 

Can anyone show me the (proably very) simple solution to this? My code is below, with the 'real world' question if Owner = Queue.

 

 

 Set<id> ownerIds = new Set<id>();
    for (Lead l : Trigger.new)
        ownerIds.add(l.OwnerId);
        
    Map<id, User> owners = new Map<id, User>([Select Id from User Where Id in :ownerIds]);      
    
    for (Lead l : Trigger.new)
        if(l.Owner = queue){
        //l.Owner_Usable__c = null;
        } else {
        //l.Owner_Usable__c  = owners.get(l.OwnerId).Id;
        }

 

 

 

Hey Guys,

 

I have the following VF code. I want to render the inputfield when the selectlist selectoptions is empty. And if its not empty show the selectlist only.

 

is this possible?

 

 

            <apex:pageBlockSection collapsible="false" columns="2" id="MappingValues">
                <apex:inputField id="TargetValue" value="{!Mapping.Value_Out__c}" required="true" />
                <apex:selectList id="TargetPickList" value="{!Mapping.Value_Out__c}" size="1">
                    <apex:selectOptions value="{!TargetPickList}"/>
                </apex:selectList>
            </apex:pageBlockSection>                     

 

 

I have a Scheduled Apex Class that runs nightly.  It loops through a bunch of data and creates a Task for some users.   I would like these tasks to be CreatedBy the Owner of the Objects I am looping through.   I was going to use System.runas() but since I do a batch insert I am not sure this will work.  They would all end up being Created By the one user I am impersonating. 

 

I could group the tasks and use System.runas() for each group of tasks who the Created By field should be set to, but I was wondering if there is a better way.

 

So how can I insert a bunch of tasks Created By different users and not the user the Apex Class is running as?

  • April 05, 2011
  • Like
  • 0

Hey guys,

 

I want to broadcast a message to all our SF users whenever they log into the org, something similar to Salesforce Maintenance pop up.

 

So the user logs into the org and the first thing he/she sees is a pop up screen. Basically, I want to display an IFRAME to all users whenever they log into the SF. After user see the popup then I will send the user to the main screen so he can continue his work.

 

I'm not sure whether there is a method or function that I can call in a SControl or a Visualforce page.

 

Any help is appreciated.

 

  • April 04, 2011
  • Like
  • 0

Anyone know if rolled back updates count toward the DML limit?

 

There limit on DML rows is 10,000.


Support I update 8,000, do a rollback, then update 5,000 more.  Will the blow the limit?

 

 

I've been trying Run-testing using test class as below.

However, one part of program code after "catch" was not tested.

I would like to know how I should write the program in the test class. 

 

@isTest
private class WXS_TEST_ClassA {

    static testMethod void myUnitTest( ) {

*************************************************

*************************************************

WXS_CL_ClassA controller = new WXS_CL_ClassA( );

*************************************************

*************************************************

controller.save( )

*************************************************

*************************************************

}

 

class to be tested is as follows.

Will it  be about how an error is given to the "controller.save( );"?

 

public with sharing class WXS_CL_ClassA {

*************************************************

*************************************************

 public PageReference save()
    {
        try {
            upsert object name;
            init();
            inputflg = false;
        } catch (DmlException de) {
            System.debug(de.getMessage());
            ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.Error, de.getMessage()));
        }
        return null;
    }

 

 

Hi,

 

I am about to be responsible for an integration project that will entail Web Services (Sending from SFDC to another system).  We do not want force the users to enter all required data that is needed by the other system when they first enter the data into SFDC.  We want a button on the opportunity that will be called 'Submit To...'

 

When the button is clicked we want to have validation done and if it passes build the necessary parameters to feed the API function that sends the data to the other system.

 

Can some help me with the building blocks for such a task.  For example.  do I simply create a class and a function in side that class that does all the nececessary validation on the opportunity and associated data (account, contact roles, etc) and if all is good, build the necessary API call and call it?

 

Is there typically a suggested building block for something like this? If so could you provide a basic outline.

What would the code look like in the button in order to call a class/function if that is the approach?

 

Hi developers,

                        how can we change the default Salesforce CRM UI.

defaultly some look and feel is observing in CRM but is possible to change as we customize some social networks themes. How can we? plz suggest options.