• saikishorecareer3341.3947811933764766E12
  • NEWBIE
  • 25 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 8
    Replies
I have a Sturdy(Custom Object) related list under standard Account object, i do want to make the New button of the Sturdy related list to be displayed only if the Account status is Active?
i want to disable a button based on a status. say quoting we have "email quote" button. this should be disabled till quote is in Approved status.please guide me on this ?

Any help would be greatly appriciated
And my code for Oppertunity is this...what is my mistak and same as when i write for solution it also shows mw some error?


apex:page standardController="Opportunity">
  <apex:form >
<apex:pageBlock title="Opportunity Edit">
<apex:pageBlockButtons >
<apex:commandButton action="{!save}" value="save" />
<apex:commandButton action="{!cancel}" value="cancel"/>
<apex:commandButton action="{!save&new}" value="save&new"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Opportunity Information" columns="2">
        
        <apex:inputField value="{!Opportunity.Private}"/>
        <apex:inputField value="{!Opportunity.name}"/>
        <apex:inputField value="{!Opportunity.Type}"/>
        <apex:inputField value="{!Opportunity.LeadSource}"/>
        <apex:inputField value="{!Opportunity.Amount}"/>
        <apex:inputField value="{!Opportunity.CloseDate}"/>
        <apex:inputField value="{!Opportunity.NextStep}"/>
        <apex:inputField value="{!Opportunity.Stage}"/>
        <apex:inputField value="{!Opportunity.Probability(%)}"/>
       </apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Hi ,

I have two custom  fields and one roll up summary field to count child records on my Opportunity object Example: Field 1 , Field 2 and Roll up field. There is a validation rule created which fires  "when the count of Roll up summary field of child objects records are greater than Zero and when Field 1 value is changed", the error message says that "You cannot change the Field 1 value when Roll Up field value is greater >0".

The issue is we have an integration with third party system, they are trying to change Field 1 value and also Field 2 value together when Rollup summary is >0. There are recieving back the validation error message but Field 2 value is updated on opportunity record before the error is sent back to their system. 

When I tried same scenario from salesforce UI Interface, the valdiation fires without updating the value for Field 2 and record does not gets saved.

I am not sure why the Field2 value is udpated through API and validaiton rule is fired later.Can you please let me know if anyone has any idea about it.

Thanks
 
  • May 01, 2015
  • Like
  • 1
I have a custom object called Questions. This object has a lookup to itself because a question can have additional questions which depend on their parent question. We need to insert 200+ at a time so I wrote an apex class that simply inserts the collection given to it:

global with sharing class QuestionRestController{
   global class RequestBody {
       global List<Question__c> questions;
   }

    @HttpPost   
    global static List<Question__c> createBulk(QuestionRestController.RequestBody req) {
        insert req.questions;
        return req.questions;
    }
}

I get this error: System.DmlException: Insert failed. First exception on row 94; first error: INVALID_FIELD, Foreign key external ID: 966.0 not found for field MyExtId__c in entity Question__c no matter what I try.

I figured I could sort the questions before sending the request so that the parent questions are always inserted first but I still get the errors. I've added debug statements so I could verify the order of the questions prior to inserting and they are ordered correctly. I've also tried to insert each question by itself:

for (Question__c question: req.questions) {
    insert question;
}

But then I get a System.LimitException because I'm sending 200+ questions.

So what is the proper way to insert a list of custom objects which have a lookup to itself when the parent and child are both being inserted with the same request?

Thanks
hi
when i convert lead to opportunity i want to display lead name that converted in opportunity.i want to write it in triggers based on a check box i am updating that field. 
 

Hello Hi, there.... Today was working on VF page and the requirement was like this.. First of all i have a VF page which will display the data and the fields from on object.. Example assume there are two fields in the object, and lets assume these fields are Name, Age...Now if i run the VF page it will display name and age fields and the data stored in that object... But what i want to do is--- I want to display the new field called Address on a VF page as soon as i go and add this(address) field in the object through set up menu.. Is this possible!!!... I will be glad with any help and i would thank them advance for it:)

Hi I have a vpage as follows..


<apex:outputLabel style="font-weight:bold;" value="Search By Branch Code" ></apex:outputLabel>
        <apex:inputText value="{!textData}"/>

 

Iam trying to pass this input textfield value(what ever i enter) to the controller by using getters and setters but iam not able to pass the value its passing  just anull value

 

Getters and setters as below

 

private String textdata = null;

    public String getTextData() { return textdata; }
    public void setTextData(String data) { textdata = data; }
 

 So Some one plz help me in passing myy in put field value to controller so that i want to use that value in my soql query

 

Eg:

CAF_Bank__c [] currentbanknames=[SELECT  Bank_Name__c FROM CAF_Bank__c  where Branch_Code__c=:textdata];

            So plz tell me with an example.............

 

       

 

                                                                                                    Thanks& Regards

                                                                                                          Anu...