• Praveen KHari
  • NEWBIE
  • 165 Points
  • Member since 2015


  • Chatter
    Feed
  • 4
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 2
    Questions
  • 52
    Replies
Hi,
I want to see ‘Create case’ button  in opportunity view after an opportunity is Closed(won)
This button should not be visible/functional before Closed (won) status
On clicking this button, a new ‘Case’ should be created values taken from opportunity
Hi,
I have create a field sets for Account that has A,B, C,D as fields.  I have 2 record type for Account. A,B is required for 1 record type and C,D is require for another record type. IF i mark them as Require on the fieldset property then all fields are required for both page layout.

How to make sure that they are required on the relevant page layout?
<apex:page standardController="Account" extensions="CloneAccountController">



    <apex:sectionHeader title="Account Edit" />
  <apex:form id="frmId">
        <apex:pageBlock title="Account Edit" mode="edit">

            <apex:pageBlockButtons >
                <apex:commandButton value="Save" action="{!save}"/>
                <apex:commandButton value="Cancel" action="{!cancel}"/>
            </apex:pageBlockButtons>
            
            <apex:pageBlockSection title="Account Information"  columns="2" >
            <apex:repeat value="{!$Objecttype.Account.fieldsets.Method}" var="AI">
              
            <apex:inputField value="{!objcase[AI.fieldPath]}" required="{!OR(AI.required, AI.dbrequired)}"/>  
            </apex:repeat>
        </apex:pageBlockSection>
        
        
        
        </apex:pageBlock>
</apex:form>
</apex:page>

 
Hi All,

I am getting error as Attempt to dereference null while am running batch apex. Could you please resolve it
Below is my code
global class batchLogBookManagementV2 implements Database.Batchable<sObject> {

global List<Log_Book__c> logToBeContinued = new List<Log_Book__c> ();
global List<Log_Book__c> logToBeInserted = new List<Log_Book__c> ();    
global List<Subject_Registered__c> sbsr = new List<Subject_Registered__c> ();
    
    global List<Weeks__c> weekList = Weeks__c.getAll().values();
    global Map<Integer, Weeks__c> weekMap = new Map<Integer, Weeks__c>();
    global Map<String, Integer> weekMapGetIntWithWeek = new Map<String, Integer>();    
    global Map<String, Subjects_and_Levels__c> subjectLevelMap =  Subjects_and_Levels__c.getAll();
    global List<Subjects_and_Levels__c> subjectLevelList = subjectLevelMap.values();
    global Map<String, Subjects_and_Levels__c> levelMap = new Map<String, Subjects_and_Levels__c>();
        
global final String query = 'SELECT id, Last_Schedule__c, Level__c, Student__c, Subject__c, Week__c, (SELECT Student__c, Subjects_Registered__c, Subject__c, Class_Scheduled_Date__c, Level__c, Week__c FROM Log_Books__r ORDER By Class_Scheduled_Date__c DESC NULLS FIRST LIMIT 1 ) FROM Subject_Registered__c WHERE Deactivated__c = false AND Last_Schedule__c != null';
 
 
global Iterable<sObject> start(Database.BatchableContext BC){
     sbsr = Database.query(query);
     for(Subject_Registered__c s: sbsr)
     {
         logToBeContinued.add(s.log_Books__r[0]);         
     }
    
    return logToBeContinued;
    }
 
global void execute(Database.BatchableContext BC,List<Log_Book__c> scope){
     for(Subjects_and_Levels__c level: subjectLevelList)
     {
     system.debug('level : '+level);
         if(level !=null)
         levelMap.put(level.subject__c+Integer.valueof(level.Order__c), level);
         else
             system.debug('error as level null');
     }
    for(Weeks__c week : weekList)
    {
    system.debug('week : '+week);
        if(week != null){
            weekMap.put((Integer)week.Order__c, week);
            weekMapGetIntWithWeek.put(week.Name, (Integer)week.Order__c);
        }
    }
     System.debug('++++++++++++++++++++++++   : ' + scope);
     for(Log_Book__c s: scope)
     {
         
         System.debug('logToBeInserted--------------------------------   : ' + logToBeInserted.size());
         System.debug('--------------------------------   : ' + s);
         Integer totalLevels = 0;
          if(s.Subject__c == 'English')
            totalLevels = 16;
          else if(s.Subject__c == 'Abacus')
            totalLevels = 11;
          else if(s.Subject__c == 'Math')
            totalLevels = 14;
          else if(s.Subject__c == 'G.K')
            totalLevels = 3;
         System.debug('xxxxxxxxxxxxxxxx  : ' + subjectLevelMap);
         //System.debug('@@Subject@@@@@@@'+subjectLevelMap.get(s.Subject__c+s.level__c));
         
             Integer levelOrder = Integer.valueof(subjectLevelMap.get(s.Subject__c +':'+s.Level__c).Order__c);
             system.debug('level order: '+levelOrder);
             Integer weekOrder = Integer.ValueOf(weekMapGetIntWithWeek.get(s.Week__c));
             system.debug('week order: '+weekOrder);
         
         Log_Book__c l = new Log_Book__c ();
         l.Student__c = s.Student__c;
         l.Subject__c = s.Subject__c;
         l.Subjects_Registered__c = s.Subjects_Registered__c;
         l.Class_Scheduled_Date__c = s.Class_Scheduled_Date__c.addDays(7);
           
         if(s.Week__c == '26-Z')
         {
             if(levelOrder < totalLevels)
             {
                 levelOrder = levelOrder +1;
                 System.Debug('lb.Subject__c+levelOrder : '+ l.Subject__c+levelOrder);
                 l.level__c = levelMap.get(l.Subject__c+levelOrder).Level__c;
                 l.Week__c = '1-A';
                 logToBeInserted.add(l);
             }
             
         }
         else
          if(s.Subject__c == 'Math' && s.Level__c == 'Level 5B' && s.Week__c == '17-Q')
            {
              if(levelOrder < totalLevels)
             {
                 levelOrder = levelOrder +1;
                 System.Debug('lb.Subject__c+levelOrder : '+ l.Subject__c+levelOrder);
                 l.level__c = levelMap.get(l.Subject__c+levelOrder).Level__c;
                 l.Week__c = '1-A';
                 logToBeInserted.add(l);
             }
       
            }
         else
         {
                weekOrder = weekOrder+1;
                l.Week__c = weekMap.get(weekOrder).Name;
                l.Level__c = s.Level__c;
                logToBeInserted.add(l);
                    
         }
         
         
     }
    if(logToBeInserted.size()>0)
    {
               
        Database.SaveResult[] srList = Database.insert(logToBeInserted, false);
        
        // Iterate through each returned result
        for (Database.SaveResult sr : srList) {
            if (sr.isSuccess()) {
                // Operation was successful, so get the ID of the record that was processed
                System.debug('Successfully inserted LogBook. LogBook ID: ' + sr.getId());
            }
            else {
                // Operation failed, so get all errors                
                for(Database.Error err : sr.getErrors()) {
                    System.debug('The following error has occurred.');                    
                    System.debug(err.getStatusCode() + ': ' + err.getMessage());
                    System.debug('Account fields that affected this error: ' + err.getFields());
                }
            }    
        
        }
        
    }
    //  System.debug('###############################  :' + ((Subject_Registered__c)scope.get(0)).log_Book__r.Class_Scheduled_Date__c);
    // scope variable now has the records received from QueryLocator.
  //  delete scope;    
   // Database.emptyRecycleBin(scope);
    }
 
global void finish(Database.BatchableContext BC){
AsyncApexJob a = [SELECT Id, Status, NumberOfErrors, JobItemsProcessed, TotalJobItems, CreatedBy.Email FROM AsyncApexJob WHERE Id =:BC.getJobId()];
 
    // Send an email to the Apex job's submitter
    // notifying of job completion.
  
 Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
 String[] toAddresses = new String[] {a.CreatedBy.Email};
 mail.setToAddresses(toAddresses);
 mail.setSubject('BAtch: ' + a.Status);
 mail.setPlainTextBody('The batch Apex job processed ' + a.TotalJobItems +' batches with '+ a.NumberOfErrors + ' failures.');
 Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
  }
}
 Below are my custom settings

User-added image

Thanks,
Jagadeesh
Hi 

I have a requirement where to display User Name in Assigned To custom field available in my custom object.

My object is Incident__c. I have a field called Assigned_To__c, having lookup relationship with User object. I am fillingup the form and trying to save it. But its not getting save. In debug log, its showing following


(32921549)|FATAL_ERROR|System.StringException: Invalid id: Sakti Sahoo Class.IncGetParmAdminClass.SaveRecord: line 64, column 1 07:56:38.032 (32931039)|CODE_UNIT_FINISHED|IncGetParmAdminClass invoke(SaveRecord)


Page:
*********


<apex:page standardController="Incident__c" extensions="IncGetParmAdminClass" sidebar="false" showHeader="false">

<apex:form >

          <apex:pageBlock title="Please Review and Submit" mode="edit">

               <apex:pageBlockButtons location="bottom">               
                       <apex:commandButton value="Submit" action='{!SaveRecord}'/>               
               </apex:pageBlockButtons>

         <apex:pageBlockSection columns="2" title="Incident Details" showHeader="true" rendered="true" >
                 <apex:outputText value="Assigned To:  {!Assigned_To_Preview}"> </apex:outputText>
         </apex:pageBlockSection>
          
          </apex:pageBlock>
</apex:form>
</apex:page>


Apex Class:
**************


public class IncGetParmAdminClass
{
    
    public Incident__c param {get; set;}

    public String Assigned_To_Preview {get;set;}
  
    public ApexPages.StandardController standard_Controller;
    public IncGetParmAdminClass(ApexPages.StandardController standard_Controller)
    {
        param = new Incident__c();

        Assigned_To_Preview =   ApexPages.currentPage().getParameters().get('vAssigned_To');
        // Here vAssigned_To, I am getting it from another page URL

    }   
       
    
   public PageReference SaveRecord()
   {
      param.Assigned_To__c = Assigned_To_Preview;
      insert param;   
      return NULL;
    }
 
}




Thanks In advance.
SAKTI
Hi Everyone,

I have time based workflow active in my production and this timebased workflow action have already queued some field update to perform. I'm doing a full copy sandbox refresh and i'm aware that i will loose all my data in full copy samdbox and production data will copied over to sandbox. 

My quesion is on pending time based workflow action. Do they also migrate to full copy sandbox?  

-Praveen KH
Hi,

I have role hierarchy configured and under CEO I have my directors. I want to create a report which group the data based on Directors level and give count of users. How many users each directors owns in the syste? I tried bucking Role field but its limiting me to enter more than 20 values.

Thanks in advance. 

-Praveen KH
Hi, 

I am trying to upload a test class into production but it has the following errors.

Convertlead.basicTestWithoutConvertedStatus Methods defined as TestMethod do not support Web Service Callouts null.
Convertlead.basicTestWith Methods defined as TestMethod do not support Web Service Callouts null
Convertlead.basicTestWithAccount Methods defined as TestMethod do not support Web Service Callouts null
Convertlead.basicTestWithAccounts Methods defined as TestMethod do not support Web Service Callouts null

 
@istest
public class convertleadtest {
        static testMethod void basicTestwith() {

        // Create dummy lead
        Lead testLead = new Lead(Company='Test Lead',FirstName='John',LastName='Doe');
        insert testLead;
    
        LeadStatus convertStatus = [Select Id, MasterLabel from LeadStatus where IsConverted=true limit 1]; 
        
        // Create dummy conversion
        ConvertLead aLeadPlugin = new ConvertLead();
        Map<String,Object> inputParams = new Map<String,Object>();
        Map<String,Object> outputParams = new Map<String,Object>();

        inputParams.put('LeadID',testLead.ID);
        inputParams.put('ConvertedStatus',convertStatus.MasterLabel);

        Process.PluginRequest request = new Process.PluginRequest(inputParams);
        Process.PluginResult result;
        result = aLeadPlugin.invoke(request);
        
        Lead aLead = [select name, id, isConverted from Lead where id = :testLead.ID];
        System.Assert(aLead.isConverted);
        
    }

/*
 * This is another basic test with just the LeadID and nothing else.
 */
 
    static testMethod void basicTestWithoutConvertedStatus() {

        // Create dummy lead
        Lead testLead = new Lead(Company='Test Lead',FirstName='John',LastName='Doe');
        insert testLead;
            
        // Create dummy conversion
        ConvertLead aLeadPlugin = new ConvertLead();
        Map<String,Object> inputParams = new Map<String,Object>();
        Map<String,Object> outputParams = new Map<String,Object>();

        inputParams.put('LeadID',testLead.ID);

        Process.PluginRequest request = new Process.PluginRequest(inputParams);
        Process.PluginResult result;
        result = aLeadPlugin.invoke(request);
        
        Lead aLead = [select name, id, isConverted from Lead where id = :testLead.ID];
        System.Assert(aLead.isConverted);
        
    }
    
 /*
  * This test is to test the convert Lead with the Account ID specified
  */
       static testMethod void basicTestwithAccount() {

        // Create dummy lead
        Lead testLead = new Lead(Company='Test Lead',FirstName='John',LastName='Doe');
        insert testLead;
        
        Account testAccount = new Account(name='Test Account');
        insert testAccount;
    

        LeadStatus convertStatus = [Select Id, MasterLabel from LeadStatus where IsConverted=true limit 1]; 
        
        // Create dummy conversion
        ConvertLead aLeadPlugin = new ConvertLead();
        Map<String,Object> inputParams = new Map<String,Object>();
        Map<String,Object> outputParams = new Map<String,Object>();

        inputParams.put('LeadID',testLead.ID);
        inputParams.put('AccountID',testAccount.ID);
        inputParams.put('ConvertedStatus',convertStatus.MasterLabel);

        Process.PluginRequest request = new Process.PluginRequest(inputParams);
        Process.PluginResult result;
        result = aLeadPlugin.invoke(request);
        
        Lead aLead = [select name, id, isConverted, convertedAccountID from Lead where id = :testLead.ID];
        System.Assert(aLead.isConverted);
        //System.debug('ACCOUNT AFTER' + aLead.convertedAccountID);
        System.AssertEquals(testAccount.ID, aLead.convertedAccountID);
    }

/*
  * This test is to test the convert Lead with the Company matching more than one existing Account Names
  */
       static testMethod void basicTestwithAccounts() {

        // Create dummy lead
        Lead testLead = new Lead(Company='Test Lead',FirstName='John',LastName='Doe');
        insert testLead;
        
        Account testAccount1 = new Account(name='Test Lead');
        insert testAccount1;
        Account testAccount2 = new Account(name='Test Lead');
        insert testAccount2;


        LeadStatus convertStatus = [Select Id, MasterLabel from LeadStatus where IsConverted=true limit 1]; 
        
        // Create dummy conversion
        ConvertLead aLeadPlugin = new ConvertLead();
        Map<String,Object> inputParams = new Map<String,Object>();
        Map<String,Object> outputParams = new Map<String,Object>();

        inputParams.put('LeadID',testLead.ID);
        inputParams.put('ConvertedStatus',convertStatus.MasterLabel);

        Process.PluginRequest request = new Process.PluginRequest(inputParams);
        Process.PluginResult result;
        result = aLeadPlugin.invoke(request);
        
        Lead aLead = [select name, id, isConverted, convertedAccountID from Lead where id = :testLead.ID];
        System.Assert(aLead.isConverted);
    }


 /*
  * -ve Test
  */    
    static testMethod void errorTest() {

        // Create dummy lead
        //Lead testLead = new Lead(Company='Test Lead',FirstName='John',LastName='Doe');
        LeadStatus convertStatus = [Select Id, MasterLabel from LeadStatus where IsConverted=true limit 1]; 
        
        // Create dummy conversion
        ConvertLead aLeadPlugin = new ConvertLead();
        Map<String,Object> inputParams = new Map<String,Object>();
        Map<String,Object> outputParams = new Map<String,Object>();
        inputParams.put('LeadID','00Q7XXXXxxxxxxx');
        inputParams.put('ConvertedStatus',convertStatus.MasterLabel);

        Process.PluginRequest request = new Process.PluginRequest(inputParams);
        Process.PluginResult result;
        try {
            result = aLeadPlugin.invoke(request);    
        }
        catch (Exception e) {
          System.debug('EXCEPTION' + e);
          System.AssertEquals(1,1);
        }
        
    }
    
    
 /*
  * This test is to test the describe() method
  */ 
        static testMethod void describeTest() {

                ConvertLead aLeadPlugin = new ConvertLead();
                Process.PluginDescribeResult result = aLeadPlugin.describe();
                
                System.AssertEquals(result.inputParameters.size(), 8);
                System.AssertEquals(result.OutputParameters.size(), 3);
        
        }

Where am I going wrong?
 
Hi,

I have a situation where we have contact name's with characters such as an apostrophe in the Name field. What is the best way to still query the contact's name that contain an apostrophe?

Example scenario:
  • Contact.Name = "John D'oe";
  • Contact.Name = "John O'doe'
Current SOQL query:
//assume it is a single contact
String nm = contact.Name;

Select Id, Name From Contact Where Name =: nm;

The current error message: uncaught exception malformed query
  • April 26, 2016
  • Like
  • 0
Suppose I've a list of fruits like 
List<string> fruits = new List<string> {'mango','papaya','orange','mango'};

then how can I assign this values to set?

for(integer i =0; i<fruits.size(); i++)

set<string> fruits1 = fruits[i];
}

The above code declaration is correct?
Hi,

I want to update an existing record Lookup field when I insert a new record.
My last post ( https://developer.salesforce.com/forums/?id=906F0000000DCnZIAW ) was also about linking records but in that case it was only the record that was inserted that was linked to an existing record.

What I want to accomplish this time is to update the lookup field on an existing record when a new record is inserted.
The problem I´ve faced so far is: 
-No ID before insert, so I can´t update lookup field in a (before insert) trigger (if I want to use the new record's ID that is).
-(After insert) trigger has ID, but you can´t update records in (after insert) triggers.

 Any suggestions/solutions?

Regards,
Isak
 
I need to add a custom date to a lead that calculates the last time a sales rep personally contacted the lead.

Problem is, my marketing automation system (Autopilot) is adding a lot of activity records so I Last Activity Date does not work.

Fortunately, Autopilot prefixes all activity subjects with "[Autopilot]". 

Is there a way to create a custom field that calculates the date of the most recent activity, where the subject does not contain "[Autopilot]"?

Thanks in advance
Sample code:

Custom Object:Obj__c:


<apex:page controller="obj__c">
<apex:form>
<apex:pageblock>
<apex:pageblocksection>

<apex:inputField value="{!obj.Name}"/>   // replace here
<apex:inputField value="{!obj.Phone__c}"/>

</apex:pageblock>
​</apex:pageblocksection>
</apex:form>
</apex:page>


Regards,
Renu....
My desktop users will have SSO via the Active Directory of the entreprise, but I want that the mobile users log in, without SSO. Is it possible ?
Hi

Is there any way to include standard objects into custom apps.

Sarvesh
why we need to use action support  in visualforce page in real time? what is the need of using action support? 
Hi Everyone,

  I have a picklist value called AV_Category__c when this picklist value is with "ISO" as its value and Recordtype name as 'Case' along whenever the  OwnerId  changed . the status field should be updated as "Pending"

i am successfull till the below part but how can i add the picklist value for the formula..
(RecordType.Name == 'Case' ) && (ISCHANGED( OwnerId))

Thanksl in advance
  • March 08, 2016
  • Like
  • 0
Hi all

I have created a class for uplaoding file and its working fine.but when i am uploading more than 135KB file its throwing error like Maximum view state size limit (128K) exceeded.Problem is when system admin uplaod more than 135 KB file it has been uploaded but on other profile it is showing this type of error.how to achieve this ...
public with sharing class CCW_UploadFileController {
 
    /*
    *   attachment
    */
    public Purchase_Order__c purchaseOrder{get;set;}
    public Attachment tAttachment{get;set;}
    public boolean showC1RecordType {get;set;}
    public boolean showC2RecordType {get;set;} 
    
    private Id c1RecordTypeId; 
    private Id c2RecordTypeId;
    
 
    /*
    *   constructor
    */
    public CCW_UploadFileController(ApexPages.StandardController controller)
    {
 
        //initialize attachment container
        this.tAttachment = new Attachment();
        c1RecordTypeId = Schema.SObjectType.Purchase_Order__c.getRecordTypeInfosByName().get('C1').getRecordTypeId();
        c2RecordTypeId = Schema.SObjectType.Purchase_Order__c.getRecordTypeInfosByName().get('C2').getRecordTypeId();
        
        purchaseOrder = new Purchase_Order__c();
        purchaseOrder = (Purchase_Order__c)controller.getRecord();
         
        String isButtonClicked = Apexpages.currentPage().getParameters().get('setDefaultValues');
        if(isButtonClicked == 'true'){
            setDefaultValues();
        }
        
        showC1RecordType = false;
        showC2RecordType = false;
        tAttachment= new Attachment();
        
        
        if(purchaseOrder.RecordTypeId == c1RecordTypeId){
            showC1RecordType = true;
            showC2RecordType = false;
        }
        else if(purchaseOrder.RecordTypeId == c2RecordTypeId){
            showC1RecordType = false;
            showC2RecordType = true;
        }
        
    }
    
     public void setDefaultValues(){
        String quoteId = Apexpages.currentPage().getParameters().get('quoteId');
        Quote__c quote = [Select o.id, o.name, o.Quantity_formula__c, o.Opportunity_Product_Detail__r.Opportunity__c,
                    o.Opportunity__c, o.Record_type_name__c,o.Company_Name__c,Opportunity_Product_Detail__r.Opportunity__r.Account__c from Quote__c o WHERE O.id=:quoteId];
        //system.assert(false,quote);     
        purchaseOrder.Opportunity__c = quote.Opportunity_Product_Detail__r.Opportunity__c;
        purchaseOrder.Quote__c = quote.id;
        purchaseOrder.Company__c = quote.Opportunity_Product_Detail__r.Opportunity__r.Account__c;
        
        if(quote.Record_type_name__c == 'C1'){
            purchaseOrder.RecordTypeId = c1RecordTypeId;
        }
        else {
            purchaseOrder.RecordTypeId = c2RecordTypeId;
        }
    }
 
    
 
    /*
    *   upload file
    */
    public PageReference doUploadFile(){
 
        if(tAttachment.Body == null){
            Apexpages.addMessage(new Apexpages.Message(Apexpages.Severity.ERROR, 'Please upload recent Purchase Order  before saving the record'));
            return null;
        }
        else{
            try{
                insert purchaseOrder;
                
              tAttachment.OwnerId = UserInfo.getUserId();
               tAttachment.ParentId = purchaseOrder.id;
              insert tAttachment;
                
                
                return new PageReference('/'+purchaseOrder.id);
            }
            catch(DMLException e){
                ApexPages.addMessage(new ApexPages.message(ApexPages.severity.ERROR,e.getMessage()));
                return null;
            }
        }
    }
}
<apex:page standardController="Purchase_Order__c" extensions="CCW_UploadFileController">
    <apex:sectionHeader title="Sale Confirmation Orders" subtitle="{!purchaseOrder.Name}" />
      <apex:form enctype="multipart/form-data">
        <apex:pageMessages ></apex:pageMessages>
        <apex:pageBlock title="Sale Confirmation Order Edit">
            <apex:pageBlockButtons >
                <apex:commandButton action="{!doUploadFile}" value="Save"/>
                <apex:commandButton action="{!cancel}" value="Cancel"/>
            </apex:pageBlockButtons>
            
            <apex:pageBlockSection title="Information" columns="2" collapsible="false" rendered="{!showC1RecordType}">
                <apex:inputField value="{!purchaseOrder.Opportunity__c}"/>
                <apex:inputField value="{!purchaseOrder.Sale_Confirmation_Order_Number__c}" required="true"/>
                <apex:inputField value="{!purchaseOrder.GRN_needed_for_Bill_Processing__c}"/>
                <apex:inputField value="{!purchaseOrder.Sale_Confirmation_Order_Date__c}" required="true"/>
                <apex:inputField value="{!purchaseOrder.No_of_Days_for_collecting_GRN__c}"/>
                <apex:inputField value="{!purchaseOrder.Committed_Dispatch_Date__c}" required="true"/>
               
              
                <apex:inputField value="{!purchaseOrder.Purchase_Frequency__c}" required="true" />
                <apex:inputField value="{!purchaseOrder.Customer_Ordered_Quantity__c}" required="true" />
                 <apex:inputField value="{!purchaseOrder.Pre_shipment_Inspection_required__c}" required="true" />
                
                   
                    <apex:inputField value="{!purchaseOrder.Customer_Price__c}"/>
                    
                     <apex:inputField value="{!purchaseOrder.Credit_Limit__c}"/>
                    <apex:inputField value="{!purchaseOrder.Bill_Submission_Period__c}"/> 
               <apex:inputField value="{!purchaseOrder.CurrencyIsoCode}"/>
                
               
                <!---<apex:inputField value="{!purchaseOrder.New_Flash_Aidc_Email_sent__c}"/>--->
               
               
               <!--- <apex:inputField value="{!purchaseOrder.New_Flash_Email_sent__c}"/>--->
                
              
               <!-- <apex:inputField value="{!purchaseOrder.PO_Uploaded__c}"/>
                <apex:inputField value="{!purchaseOrder.Try__c}"/>
                <apex:inputField value="{!purchaseOrder.CountAttachment__c}"/>--->
            </apex:PageBlockSection>
            
            <apex:pageBlockSection title="Information" columns="2" collapsible="false" rendered="{!showC2RecordType}">
                <!---<apex:inputField value="{!purchaseOrder.Opportunity__c}"/>
                <apex:inputField value="{!purchaseOrder.Sale_Confirmation_Order_Number__c}" required="true"/>
                <apex:inputField value="{!purchaseOrder.GRN_needed_for_Bill_Processing__c}"/>
                <apex:inputField value="{!purchaseOrder.Sale_Confirmation_Order_Date__c}" required="true"/>
                <apex:inputField value="{!purchaseOrder.No_of_Days_for_collecting_GRN__c}"/>
                <apex:inputField value="{!purchaseOrder.Committed_Dispatch_Date__c}" required="true"/>
                <apex:inputField value="{!purchaseOrder.Credit_Limit__c}"/>
                <apex:inputField value="{!purchaseOrder.Customer_Ordered_Quantity__c}"/>
                <apex:inputField value="{!purchaseOrder.CurrencyIsoCode}"/>
                <apex:inputField value="{!purchaseOrder.Customer_Price__c}"/>
                <apex:inputField value="{!purchaseOrder.Purchase_Frequency__c}" required="true" />
                <apex:inputField value="{!purchaseOrder.Bill_Submission_Period__c}"/>--->
                   <!---<apex:inputField value="{!purchaseOrder.Application_Area__c}"/>
               
            <apex:inputField value="{!purchaseOrder.CountAttachment__c}"/>
                <apex:inputField value="{!purchaseOrder.Try__c}"/>
                <apex:inputField value="{!purchaseOrder.New_Flash_Email_sent__c}"/>
                 <apex:inputField value="{!purchaseOrder.New_Flash_Aidc_Email_sent__c}"/>---->
                 
                 
                 <apex:inputField value="{!purchaseOrder.Opportunity__c}"/>
                <apex:inputField value="{!purchaseOrder.Sale_Confirmation_Order_Number__c}" required="true"/>
                <apex:inputField value="{!purchaseOrder.GRN_needed_for_Bill_Processing__c}"/>
                <apex:inputField value="{!purchaseOrder.Sale_Confirmation_Order_Date__c}" required="true"/>
                <apex:inputField value="{!purchaseOrder.No_of_Days_for_collecting_GRN__c}"/>
                <apex:inputField value="{!purchaseOrder.Committed_Dispatch_Date__c}" required="true"/>
               
              <!--- <apex:inputField value="{!purchaseOrder.Sale_Confirmation_Order_Number__c}"  required="true"/>--->
                <apex:inputField value="{!purchaseOrder.Purchase_Frequency__c}" required="true" />
                <apex:inputField value="{!purchaseOrder.Customer_Ordered_Quantity__c}" required="true" />
                 <apex:inputField value="{!purchaseOrder.Pre_shipment_Inspection_required__c}" required="true" />
                
                   
                    <apex:inputField value="{!purchaseOrder.Customer_Price__c}"/>
                    
                     <apex:inputField value="{!purchaseOrder.Credit_Limit__c}"/>
                    <apex:inputField value="{!purchaseOrder.Bill_Submission_Period__c}"/> 
               <apex:inputField value="{!purchaseOrder.CurrencyIsoCode}"/>
                
            </apex:PageBlockSection>
            
            <apex:pageBlockSection title="Quote Details" columns="1" collapsible="false">
                <apex:inputField value="{!purchaseOrder.Quote__c}"/>
                <apex:inputField value="{!purchaseOrder.Company__c}"/>
                 <apex:inputField value="{!purchaseOrder.Delivery_Address__c}" required="true" />
            </apex:PageBlockSection>
            
            <apex:pageBlockSection title="New Flash Details" columns="2" collapsible="false" >
            
            
            
        <apex:inputField value="{!purchaseOrder.Application_Area__c}"   />
                       
              
                <apex:inputField value="{!purchaseOrder.Remarks__c}"/>
      

                                        
            </apex:PageBlockSection>
            
            <apex:pageBlockSection title="Upload Purchase Order" columns="2" collapsible="false">
                <apex:pageBlockSectionItem >
                <apex:outputLabel value="File" for="file" />
                
            <apex:inputFile value="{!tAttachment.Body}" filename="{!tAttachment.Name}" filesize="{!tAttachment.BodyLength}" contentType="{!tAttachment.ContentType}" />
          
                </apex:pageBlockSectionItem>
            </apex:PageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>


 
Hi,
I want to see ‘Create case’ button  in opportunity view after an opportunity is Closed(won)
This button should not be visible/functional before Closed (won) status
On clicking this button, a new ‘Case’ should be created values taken from opportunity
Hello all,

I would like to know if it is possible to have more than one active SSO integration to one single salesforce org. For instance, we are planning to have one org for customer service for America region, but each state has a different SSO application.
Is that possible?
Thanks a lot.
I'm trying to get percentage quota for each user. It's basically Number of calls made * 100 / Expected quota. Expected quota remains the same for all users. Currently I've created a new field called quota and duplicated the same value across the table. Is there a way I can create a global constant called quota and assign a value to it to use it in a formula?

We are currently running numerous soql queries via the rest api.

 

The issue we see is that sporadically throughout the day we will receive

 

"message"=>"Your query request was running for too long.", "errorCode"=>"QUERY_TIMEOUT"

 

errors.  The same queries will run fine at diffferent times during the day as well..

 

So my quesiton is what are the limits/timeout settings using the REST API.  In the documentation I don't see anything about how to set a time out or any limit settings, like we could do in the SOAP API..  We think it appears to be timing out around 1 minute.

 

Any help is appreciated..

Hi

I'm new to App Exchange package licencing and am trying to find out about the following situation:

We'd like to publish our App on the AppExchange and licence it as follows:

- assign seat licences for internal users of the company.  These would be normal paid licences.

- assign seat licences for external members accessing the app via communities (so they can use the app too).   These would be "free" licences as we'd bill a flat rate for communities availability.

I'm concerned that Community Users won't be able to use the app unless they have a licence assigned to them.   But we don't want to require that every single external user has a fully paid licence assigned to them.

Is this even possible with Salesforce AppExchange licences?   From what I read it seems you can only opt to have a site-wide licence or X number of seat licences?   There doesn't seem to be a way to let some users use the App via a paid licences and others via a free licence,

Thanks for your thoughts