• Shaijan Thomas
  • SMARTIE
  • 733 Points
  • Member since 2015

  • Chatter
    Feed
  • 22
    Best Answers
  • 0
    Likes Received
  • 2
    Likes Given
  • 5
    Questions
  • 251
    Replies
Hi,

Is it possible to merge leads with the same last name and first name but with different mails and keep different mails (up to 3 differents mails)?

Thank you,
Stephane.
Hi,

The following code gives me different results when run it in test class.
Pricebook2[] standardPB = [Select Id From Pricebook2 where IsStandard = true];
System.debug('standardPB = '+standardPB.size());

When include this in test class, it gives me: "standardPB = 0" where in Execute Anonymous, it gives me "standardPB = 1". 

I have the following code in my trigger, which gives me "List index out of bounds" when running test class.
String standardPBId = [Select Id From Pricebook2 where IsStandard = true][0].Id;
Could someone explain it?

Thanks,
 
I create a contact with the the first name as Bobby and email 'bob@example.com'. If I then immediately search for this contact by email, it does not return anything. However, if I search by Bobby, it will show up immediately. I have to wait for 10 mins or so until SF has indexed the email, then searching by email works.

Note, this happens both on SFDC directly, and over the REST API when using SOSL. So if I create the contact on SFDC and run a global search in the top left with 'bob@example.com', it returns nothing.

This has only recently started happening though, since December-ish. It used to work fine before that. Is there some SF setting that I'm not aware of that handles this? I don't see anything relavent in the Setup > Customize settings.


Here's the SOSL query I run over the API:
FIND {bob@example.com} IN EMAIL_FIELDS RETURNING Contact(Id, Email)

This may not be the right place for this so please let me know if I should post this elsewhere.

 
  • February 17, 2015
  • Like
  • 0
I have a C# program what was working great until i modified this query.  The query currently reads...

qr1 = binding.queryAll("select id, external_id__c from contact where external_id__C in '" + naidno2 + "'");

This line of code produces this error message... "Binding variable only allowed in Apex code"

naidno2 is a string which contains unique IDs separated by commas, i.e. "A4568,R4568,D6548,A4568"
 
Hi all I am very new to Apex code.I am able to do basic stuff but really struggling w this. Any help or code sample is appreciated.
Scenario- I have a custom object say DMContact, in that I have a contact look up field.
When any contact is selected in a DMContact record I want to flag that contact as being used in the DMContact.
So basically I want to retrieve the ID of the contact records selected in the look up field on the DNContact record, then go that contact record and update a checkbox field on Contact object called 'DMContact'.
Can anyone help me ? I create an entitlement and try create a case using that entitlement but i got the error in the subject 

User-added imageUser-added image
I need to craete a Visualforce with a Scenario like this..

XXXX       XXXX
XXXX       XXXX
                XXXX
                XXXX

            

Yes, of course I used a <apex:panelgrid column="2"> But it gives the output like this,

XXXX       XXXX
XXXX       XXXX
XXXX       XXXX

        
Any help..!!
Hi All,

I have configured workflow to send email using VF email template.

If i click the button Send Test and Verify Merge Fields, then values are coming in all merge fields.

But when that workflow(send email using VF email template) get executed then the two merge fields are not coming with values (Dear Field_value1 and Field_value2,).

The class is having signature Without sharing.

Could you please suggest to resolve this issue?

Thanks in Anticipation,

Regards,
GM ...
  • January 30, 2015
  • Like
  • 0
Hi all,

I create a auto respose rule but it is not fire. Can anyone help me ?User-added image

I create two case with status escalated and not esccalated but nothing happen

 
Hi,

I am having a custom label called as "Admins" which contain all the profile names details


i am currently hardcoding my profile in my vf page in the below manner

                <apex:pageBlockSectionItem  rendered="{!IF($Profile.Name!='System Administrator',true,false)}">

rather than doing that can i use my custom label directly for checking the profile


let me know how to proceed

Thanks in Advance


 
Hi,

I am getting 'Method does not exist or incorrect signature' error while deploying the code. I have 2 different classes A & B. B has X method in it and A is calling X method.

Before in Prodcopy
X(List)
After
X(Map<>)

I have changed the method definition and updated the parameter variable declartion from list to map. I am trying to deploy both classes at once to Prodcopy. Prodcopy has got old method X with parameter as List. Is this creating a problem while deploy?

Please help.

Thanks
Kumar
  • January 27, 2015
  • Like
  • 0
Hi Guys, I have a trigger to automate the Approval process and I got 100% code coverage when I run my test class even though the test failed due to managed package trigger conflict (System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, SVMXC.WORD_Trigger1: execution of BeforeUpdate)
 
Trigger :

trigger SubmitForApproval on SVMXC__Service_Order_Line__c (after insert) {

    for (Integer i = 0; i < Trigger.new.size(); i++) {

        if (Trigger.new[i].RecordTypeId == '012G000000163Ww' ) {

            // create the new approval request to submit
            Approval.ProcessSubmitRequest req = new Approval.ProcessSubmitRequest();
            req.setComments('Submitted for approval. Please approve.');
            req.setObjectId(Trigger.new[i].Id);
            // submit the approval request for processing
            Approval.ProcessResult result = Approval.process(req);
            // display if the reqeust was successful
            System.debug('Submitted for approval successfully: '+result.isSuccess());

        }

    }

}

Test Class:

@IsTest
private class Workdetail {
    static testmethod void SubmitForApproval(){
    
    
    test.starttest();
  SVMXC__Service_Order_Line__c quote = new SVMXC__Service_Order_Line__c(
 SVMXC__Service_Order__c='a0oK0000001RPot',
  RecordTypeId='012G000000163Ww');
   SVMXC__Line_Type__c='Labor',
 
insert quote;
   test.stopTest();     
          }
}

Can any one help me to pass the test class otherwise I cannot deploy into production.
Hello Everyone,

This is the first time I've attempted to create a REST API layer for my Salesforce ORG.  I'm trying to allow my ORG to receive a REST URI and return a list of Builders (which are Accounts).  The error I get when I try to save this code in the SF Developer Console is:  Method does not exist or incorrect signature: getBuilder(String, RestRequest)

Any assistance you could provide would be greatly appreciated!  Code is below:

@RestResource(urlMapping='/v.1/builders/*')
global with sharing class RESTAPI_MYSQL_Builders {
    
    @HttpGet
    global static List<Account> doGet(RestRequest req, RestResponse res) {
        
        String name = req.requestURI.substring(req.requestURI.lastIndexOf('/')+1);
        
        if(name != 'builders') {
            
            return getBuilder(name, req);
        }else {
            
            return getBuilders(req);
        }
    }
    
    private static List<Account> getBuider(String name, RestRequest req) {
        
        //Set Defaults
        String qryFields = 'id, name';
        //Set fields to return (If Available)
        if(req.params.containsKey('fields')) qryFields = req.params.get('fields');
        
        return Database.query('select ' + qryFields + ' from Account where name = \'' + name + '\'');
    }
    
    private static List<Account> getBuilders(RestRequest req) {
        
        //Set Defaults
        String qryFields = 'id, name';
        String qryLimit = 'limit 100';
        String qryOrderby = '';
        String qryWhere = '';
        
        //Set fields to return (If Available)
        if(req.params.containsKey('fields')) qryFields = req.params.get('fields');
        if(req.params.containsKey('limit')) qryLimit = 'limit' + req.params.get('limit');
        if(req.params.containsKey('orderby')) qryOrderby = 'order by' + req.params.get('orderby');
        if(req.params.containsKey('search')) qryWhere = 'where name LIKE \'' + req.params.get('search') + '%\'';
        
        return Database.query('select' + qryFields + ' from Account ' + qryWhere + ' ' + qryOrderby + ' ' + qryLimit);
    }
}
Hi

I wrote this code about fieldsets ,which is working fine , but here that field related text box only appear  ,i need to display label name with text box.
please any one help me how to display label name.

<apex:page standardController="Account">
<apex:form >
<apex:repeat value="{!$ObjectType.Account.FieldSets.TestforFieldSet}" var="pi" > 
        <script>alert('{!pi}');</script>
        <option value="{!$ObjectType.Account.Fields[pi].localname}" />
        <option value="{!$ObjectType.Account.Fields[pi].label}" />
      <apex:inputField value="{!Account[pi]}" />         
</apex:repeat>
</apex:form>
</apex:page>
Hi All,
Actully i want to add new button on Account detail page.for this i took a new detail page button from button links and action and also edit from Account page layout. but button is not showing on Account detail page.

Please help me
Can anyone help me please
I have 3 objects "Pre_Factura - OT - Cuenta"
They relations are:
masterRe Pre_Factura --->  OT
lookupRe Cuente --->  Pre_Factura

and I have 3 visualpages, one is call Pre_FacturaPage,
and I want to know if I can go to another page "OTPages" once I save it, kind of like finishlocation in a flow.
but when I go to the other pages go with the information from the object I created before "Pre_Factura"
 
Hello everyone,

I'm executing the approval process by apex trigger on my customobject. While inserting record i'm facing the below error:
"Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, getApproverValueFromApproversGroup: execution of BeforeInsert caused by: System.DmlException: Process failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, missing required field: [objectId]: [objectId] Trigger.getApproverValueFromApproversGroup: line 31, column 1: []"

trigger logic:
Set<Id> ordrprdctIds = new Set<Id>();
    for(RMA_Request__c r:trigger.new){
        Id prdctid=ordrPrdctMap.get(r.Order_Product__c);
        if(aprvrGrpMap.get(prdctid)!=null)
           r.Approver__c= aprvrGrpMap.get(prdctid);
        // Create an approval request for the RMA
        if(r.Status__c=='In-Progress' && r.Approver__c!=null){
            Approval.ProcessSubmitRequest req1 = new Approval.ProcessSubmitRequest();
            req1.setComments('Submitting request for RMA Approval ');
            req1.setObjectId(r.id);
            req1.setNextApproverIds(new Id[] {r.Approver__c});
           System.Debug('Approver value@@'+r.Approver__c);
            // Submit the approval request for the RMA
            Approval.ProcessResult result = Approval.process(req1);---> Error line
        }    
    }

Please assist me with your valuable solution.
Thanks in advance!!
Hi,

I currently have an SOQL query that gets a list of users who are of a specific profile and are active, which looks like this:
[SELECT Id, Name FROM User WHERE Profile.Name = 'Pollinators' AND IsActive = TRUE ORDER BY Name ASC]

This list is used to populate a dynamic picklist that managers user to access filtered reports. However, my business is expanding into new cities and so I want to also filter this list by showing only users who are in the same city as the manager.

I figured the best way to do this is to match the City field value on the User's record page. Upon doing some reading, I found a list of UserInfo Methods, and I can't see anything in there for City.

Can anyone help with how I might acheive this?
Thanks
 
  • January 21, 2015
  • Like
  • 0
We have a long-time run batch job in org, but it was aborted by someone when it was running, is there any way to track which user did this?
Hi All,

I am trying to access the class varible dynamically for one of my requirment. Please see the code.

public class CaseUpdateTestingClass {
    public string AssetSN = '1AED45';
    public string CDIDId='3498474';
    public string ContactFirstName='SalesForce';
}
CaseUpdateTestingClass es = new CaseUpdateTestingClass();
string ss = 'AssetSN;CDIDId;ContactFirstName'; // Here I do dynamic assignment
for ( string a : ss.split(';'))
system.debug('*********** : '+es.get(a));

Thanks
Shaijan Thomas
Hi All,

I am trying to access the class varible dynamically for one of my requirment. Please see the code.

public class CaseUpdateTestingClass {
    public string AssetSN = '1AED45';
    public string CDIDId='3498474';
    public string ContactFirstName='SalesForce';
}

CaseUpdateTestingClass es = new CaseUpdateTestingClass();
string a = 'AssetSN'; // Here I do dynamic assignment
system.debug('*********** : '+es.get(a));

Thanks
Shaijan Thomas
Hi 

I tried follwong scenario but it gives error. Please help....
1. /services/data/v33.0/sobjects/Account/0019000001F3v4r - Workbench gives error "The requested resource does not exist"
2. /services/data/v32.0/sobjects/Account/0019000001F3v4r - Workbench returned currect message

1. curl https://ap1.salesforce.com/services/data/v33.0/sobjects/Account/0019000001F3v4r -H "Authorization: Bearer 00D90000000dTd2\!AQEAQKYSV6Wnk0VPIUSLSnJuUihObStiCjL3z3dv1dh_JKVI5sF5_vQyg0VAulemYDYSncDUlVV2eiUMCrJ.ERFYjvsDqUzN":- Gives error "The requested resource does not exist"
2. curl https://ap1.salesforce.com/services/data/v32.0/sobjects/Account/0019000001F3v4r -H "Authorization: Bearer 00D90000000dTd2\!AQEAQKYSV6Wnk0VPIUSLSnJuUihObStiCjL3z3dv1dh_JKVI5sF5_vQyg0VAulemYDYSncDUlVV2eiUMCrJ.ERFYjvsDqUzN" : - Gives invalid session ID

Please help me on this issue
Thanks
Shaijan Thomas
To complete this challenge, add a validation rule which will block the insertion of a contact if the contact is related to an account and has a mailing postal code (which has the API Name MailingPostalCode) different from the account's shipping postal code (which has the API Name ShippingPostalCode).Name the validation rule 'Contact must be in Account ZIP Code'.
A contact with a MailingPostalCode that has an account and does not match the associated Account ShippingPostalCode should return with a validation error and not be inserted.
The validation rule should ONLY apply to contact records with an associated account. Contact records with no associated parent account can be added with any MailingPostalCode value. (Hint: you can use the ISBLANK function for this check)

for the above challenge I used following validation rule and its working

IF( AND(NOT( ISBLANK(  MailingPostalCode__c)), NOT(ISBLANK( AccountId )) ),  IF( (NOT(MailingPostalCode__c = Account.ShippingPostalCode__c)), true, false) , false)

But when I click on check challenge giving Error anybody can can help me on this.
   Error Message              "Challenge not yet complete... here's what's wrong: The validation rule failed to enforce the business logic"

Thanks
Shaijan

@isTest(SeeAllData=True)
public class TestStatAndStop {
    public static testmethod void MyMothod()
    {
        for (integer i =1; i<=90;i++)
            Contact b1 = [select id from contact limit 1];
        Test.startTest();
        for (integer i1 =1; i1<=99;i1++)
        {
            Account b = [select id from account limit 1];
        }  
        Test.stopTest();
}
}
I have two object
1. Contacts__c
2. Sales_VP_By_Territory__c

On the Contacts__c object, I have two fields
1. Sales VP (Picklist / read only)
2. Territory (Picklist)

On the Sales_VP_By_Territory__c, I have two fields. This object is hidden from users
1. Sales VP
2. Territory

On the Contacts__c object, I would like the user to select the Territory. Once they select one and save the record, a Trigger will fire and store the current record Territory in a variable and then execute a SOQL query on the Sales_VP_By_Territory object and get the Sales_VP__c field value and store it in a variable. Then it will go back and populate the Contact__c records field Sales_VP__c.

Here is my code, but the issue is, it keeps telling me 
"GetSalesVP: data changed by trigger for field Sales VP: bad value for restricted picklist field: (Sales_VP_By_Territory__c:{Sales_VP__c=Brandon Nelson, Id=a0z3a000007e8LSAAY})"

If you notice in my SOQL query, I'm not pulling ID so why is it trying to insert it?
 
trigger GetSalesVP on Contact__c (before insert, before update) {
   	
    String territory;
    String getSalesVP;
    
    for(Contact__c c : Trigger.new) {
        territory = c.Territory__c;
        
	List<Sales_VP_By_Territory__c> getSalesVP = [SELECT Sales_VP__c FROM Sales_VP_By_Territory__c WHERE territory__c = :territory]; 
          
    c.Sales_VP__c = String.valueOf(getSalesVP);
        
    }  
}

 
Account have Opportunities. Opportunities have OpportunityTeamMembers
Accounts also have Territory(Custom Object API Name = Territory_Lookup__c). Territory Object has a field called Geo.

I need to write a SOQL query from OpportunityTeamMembers to lookup the Account -> Its Territory and the Geo on the Territory

Select Id, TaxEntity__c, OpportunityId.AccountId.Territory_Lookup__r.Geo__c From OpportunityTeamMmeber

The component - OpportunityId.AccountId.Territory_Lookup__r.Geo__c is incorrect. Can you please suggest how to get this 
  • July 16, 2019
  • Like
  • 0
1.)I have a Checkbox field called "Best Contact" in contact object.
2.)I have a checkBox field called "Contains Best Contact" in account object.
My requirement is if atlest one contact checkbox field (Best Contact)is true then we have to make corresponding Account checkbox filed(Contains Best Contact)to true
    public static void insertIndividual(List<Contact> tNew, List<Contact> tOld){
        try{

            //
            List<Individual> lst_indiv = new List<Individual>();
            //
            for(Contact con : tNew){
              lst_indiv.add(FirstName = con.FirstName, LastName = con.LastName, Salutation=con.Salutation);
            }    
            //
            //
            if(!lst_indiv.isEmpty()){
                insert lst_indiv;
            }
        }catch(Exception exc){
            LogHelper.generateLog('ContactMethods.insertIndividual()', exc, 'Trigger');
        }
    } //insertIndividual
when ever we insert record in account if same name exist then the data must update in old record 
help me 
Hi,

Is it possible to merge leads with the same last name and first name but with different mails and keep different mails (up to 3 differents mails)?

Thank you,
Stephane.
Hi all,

Consider i have one object named as obj1 and have self-lookup within that. So record of obj1 can have multiple child records of the obj1(same object). Now i want to update child records when parent getting updated. How can i face this scenario? Please suggest any ideas.
Hi,

I am having a long text area field where i am not getting the values in my trigger , Let me know how to refer long text area field in my trigger

MY TRIGGER :

trigger createcontract on Proposal__c(after insert) {
    
    List <Contract__c   > contractToInsert = new List <Contract__c> ();
    
    for (Proposal__c o : Trigger.new) {
        
        Id recId = Schema.SObjectType.Proposal__c.getRecordTypeInfosByName().get('Adhoc Charter').getRecordTypeId();

        
        if (o.RecordTypeId == recId) {  
        Contract__c  v = new Contract__c ();  
        v.Account__c = o.Account__c;  
        v.Opportunity__c = o.Opportunity__c ; 
        v.Name=o.Name;
        v.Proposal__c   =o.Id;
        v.Contract_Start_Date__c=o.Proposal_Start_Date__c;
        v.Contract_End_Date__c  =o.Proposal_End_Date__c;
        v.Forecast_Charter_Spend__c =o.Forecast_Charter_Spend__c;
       v.Description__c=o.Description__c;
        v.Contact_Information__c=o.Contact_Information__c;

        v.Forecast_Charter_Spend__c =o.Forecast_Charter_Spend__c;
        v.RecordTypeId = [select Id from RecordType where Name = 'Adhoc Charter' and SobjectType = 'Contract__c'].Id;
        contractToInsert.add(v);
        
        }
        
    }
    
    
    try {
        insert contractToInsert; 
    } catch (system.Dmlexception e) {
        system.debug (e);
    }
    
}

Kindly help me pls

Thanks in advance
 
Line no 14 I am getting this error. "Type cannot be constructed: String" Please help me on this.
  1.    public String type_Z {get;set;} 
  2.     public List<String> authcookies {get;set;} 
  3.  
  4.     public JsonStringsss(JSONParser parser) {
  5.         while (parser.nextToken() != JSONToken.END_OBJECT) {
  6.             if (parser.getCurrentToken() == JSONToken.FIELD_NAME) {
  7.                 String text = parser.getText();
  8.                 if (parser.nextToken() != JSONToken.VALUE_NULL) {
  9.                     if (text == 'type') {
  10.                         type_Z = parser.getText();
  11.                     } else if (text == 'auth-cookies') {
  12.                         authcookies = new List<String>();
  13.                         while (parser.nextToken() != JSONToken.END_ARRAY) {
  14.                             authcookies.add(new String(parser));
  15.                         }
  16.                     } else {
  17.                         System.debug(LoggingLevel.WARN, 'Root consuming unrecognized property: '+text);
  18.                         consumeObject(parser);
  19.                     }
  20.                 }
  21.             }
  22.         }
  23.     }
Hi All,
I have created one component which will generates an excel with opportunity fields now i need to display only date instead of datetime in excel how can i achieve this :
Now in the generated excel it is displaying as: Mon Jan 31 09:37:37 GMT 2016
I  need to display like this:31/01/2016
Error Message
System.NullPointerException: Attempt to de-reference a null object
Error is in expression '{!doUploadFile}' in component <apex:commandButton> in page testing: Class.CCW_UploadFileController.doUploadFile: line 69, column 1
Class.CCW_UploadFileController.doUploadFile: line 69, column 1
 
public with sharing class CCW_UploadFileController {

    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;
    
 
    public CCW_UploadFileController(ApexPages.StandardController controller)
    {
 
       
        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;
        }
    }
 
    
 
   
    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.Pre_shipment_Inspection_required__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.Credit_Limit__c}"/>
                   
                    <apex:inputField value="{!purchaseOrder.Customer_Price__c}"/>
                     <apex:inputField value="{!purchaseOrder.CurrencyIsoCode}"/>
                <apex:inputField value="{!purchaseOrder.Bill_Submission_Period__c}"/>
               
                <!---<apex:inputField value="{!purchaseOrder.New_Flash_Aidc_Email_sent__c}"/>--->
               
               
               <!--- <apex:inputField value="{!purchaseOrder.New_Flash_Email_sent__c}"/>--->
                <apex:inputField value="{!purchaseOrder.Committed_Dispatch_Date__c}" required="true"/>
              
               <!-- <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: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}"  rendered="{!showC1RecordType}"/>
                <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>


 
This is my code

global class BatchSchedule implements Database.Batchable<Sobject>{
    global String Query;
    global BatchSchedule(){
        Query='Select Id,FirstName,LastName from Contact';
        
    }
    global Database.QueryLocator Start(Database.BatchableContext bc){
        return Database.getQueryLocator(Query);
        
    }
    global void execute(Database.BatchableContext bc,List<Sobject> scope){
        List<Contact> con=new List<Contact>();
        for(Contact c:scope){
            c.FirstName='Jayanth';
            c.LastName='Chowdary';
                con.add(c);
            }
        update scope;
        }
    
    global void finish(Database.BatchableContext bc){
        
    }
}
 would like to know that where's this Owner coming from? I don't see there's a Owner object and I believe that Owner.Name was getting from User object.when should we use owner field ?
Hi guys, i want to one user to see and edit the list views craeted by the other user(both are standard users). How is that possible? 
How can we achieve this functionality? Please help
I am trying to use user-agent oauth flow for a REST API call but getting INVALID_SESSION_ID using curl after authenticating. Here are the steps I am following:
1. Make a call to salesforce login to get access token:
https://login.salesforce.com/services/oauth2/authorize?response_type=token&client_id=<CONSUMER KEY>&redirect_uri=https://Mysamplesite/returnurl.html
I get the following in the return URL after logining in:
https://mysamplesite/returnurl.html#access_token=<ACCESS TOKEN>&instance_url=https%3A%2F%2Fna16.salesforce.com&id=https%3A%2F%2Flogin.salesforce.com%2Fid%2F00Dj0000001sdROEAY%2F005j000000BU6JbAAL&issued_at=1423448917611&signature=nDdwrOErs%2B0JAQf9F8bBisFbKIm%2F8OlxC%2Bz917fZRbk%3D&scope=api+web+full&token_type=Bearer
2. I am using the ACCESS_TOKEN in the REST API call using CURL:
curl https://na16.salesforce.com/services/data/v20.0/ -H 'Authorization: Bearer <access_token>'

Getting the following error message:

[{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}]
Am I missing something?
 
I am looking for someone to develop a force.com site within my salesforce organization that will allow me to have my website completely integrated with my saleforce platform.

I don't even know where to begin looking..

Who out there can develp a website for me utilizing my current organizations platform allowing it to all sync and work together. I am looking for bids to accomplish our goals.

Please send me an email at admin@strategicmms.com (mailto:admin@strategicmms.com) with contact info and I can contact you to discuss what I am in need of.

Would be preferable if you were in Utah... But I can always work around that if need be.