• NaveenReddy
  • NEWBIE
  • 137 Points
  • Member since 2013
  • techrains

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 23
    Questions
  • 56
    Replies
Hi,
I am inserting a record in another object B, once an insert trigger is executed in my source object A.
however i want to display error message /notify if any of the fields of object B failed to get populated with values from object A.
The user should be notified that the insertion in object B failed ,because a field X couldn't be populated due to some reason.

Hi folks
       Can anyone tell me what is trigger.oldmakp.keyset() and give me sample example for that

Please Help
Hi All,

I'm unable to find the button Reply, Reply All and Forward on email message related to a custom object. Where as it is visible to some email message.

Could you please help me to figure out what will be the issue.

The email message is created through apex. The code to create email message for all is same. 


User-added image

Reply buttons are visible

Thanks,
Naveen
Thanks,
Naveen
Hi All,

I have the following requirement :-
1) A custom related list button (VF Page button) on opportunity for related object. i.e. (Quote is child object to opportunity, button is on Quote).

User-added image

2) On click of the button a new VF page opens in new tab
3)The VF page has a button and other logic, on click of this button it has to open a create case record with pre-populating some fields.

User-added image

URL hacking and sforce actions are not working in lightning . Can you please help to achive this since it is a existing functionality and migrating to lightning .

Any help is really apprecieated . Thanks in advance.

Thanks,
Naveen Mallepalli
Hi,
 I would like find all dependancies related to every component while deploying(to avoid deploy errors)..
Is there any way to find this. In change sets we have option view/add dependancies option.
How can this same can be achieved by writing any code or any other way apart from change sets.
i.e. While deploying an apex class I would like to see fields,objects etc..that is used in this class.

Note:it is very urgent and your help is really appreaciated. 

Thanks in Advance.

Regards,
Naveen.
Hi,
Can any one help me in converting String to DateTime in apex.
Im able convert below format.

DateTime dt = DateTime.parse('11/6/2014 12:00 AM');

If I use below format Im getting error.

Datetime dt = DateTime.formatGmt('09-Dec-2014 10:43 AM');

System.TypeException: Invalid date/time: 09-Dec-2014 10:43 AM.

Thanks in advacne.

Regards,
naveen.


 
Hi,
 I'm going through the below workbook. http://www.salesforce.com/us/developer/docs/platform_connect/canvas_framework.pdf
I'm struck at page no.26 .Im unable to see the below result after selecting hello world app.

User-added image

Any help is really appreaciated.Thanks in advance.

Regards,
Naveen.
 
Hi,
 I need sample reports and dashboards which should cover all type of reports and dashboards.Please share the link or package details.

Thanks in advance.

Regards,
Naveen.
Hi,

 Can anybody please help me in how to execute custom action when we select a standard tab without changing its functionality..

Thanks in advance

Regards,
Naveen.
Can any one help me in how to generate reports in salesforce using data from other external application i.e Java application.

Thanks in advance.

Regards,
Naveen
Hi,

 I need sample .csv files(bulk in number of records) both for standard objects and custom objects(Any custom objects).

I need this data to test my application. Thanks in advance.

Regards,
Naveen
Hi ,
 Can anyone help me in converting WSDL to jar file.

I have used below command but getting an error.

java -classpath C:\Users\Techrains\Desktop\Jars\force-wsc-32.1.0.jar;C:\Users\Techrains\Desktop\Jars\ST4-4.0.8.jar;C:\Users\Techrains\Desktop\Jars\appengine-api-1.0-sdk-1.9.10.jar;C:\Users\Techrains\Desktop\Jars\antlr-runtime-3.5.2.jar com.sforce.ws.tools.wsdlc metadata.wsdl metadata.jar  C:\Users\Techrains\Desktop\Jars\metadata.wsdl  C:\Users\Techrains\Desktop\Jars\metadata.jar


Note:I have placed dependant  jars and WSDL files in the correct path only.

Any help from you is really appreciated. Thanks in advance

Exception in thread "main" java.io.FileNotFoundException: metadata.wsdl (The sys
tem cannot find the file specified)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(Unknown Source)
        at java.io.FileInputStream.<init>(Unknown Source)
        at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
        at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown So
urce)
        at java.net.URL.openStream(Unknown Source)
        at com.sforce.ws.wsdl.WsdlFactory.create(WsdlFactory.java:47)
        at com.sforce.ws.codegen.Generator.generate(Generator.java:90)
        at com.sforce.ws.tools.wsdlc.run(wsdlc.java:115)
        at com.sforce.ws.tools.wsdlc.run(wsdlc.java:149)
        at com.sforce.ws.tools.wsdlc.main(wsdlc.java:71)




Regards,
Naveen

Can anyone pls give the smaple code to override the "new" button in Account object.

Thanks in advance.


Hi ,

Any one pls help me in finding list of change sets that are available in a sandbox.

either through SOQL query or any API etc..

Urgent pls..??

Thanks in advance
Hi,
Can anyone pls help me in solving below task.


Demonstrate your integration skills

a. If you do not have a gmail account create one

b. Create a google spreadsheet and create a google script to

- Show a menu when you open the gdoc with the following

1. Login to SFDC

2. Extract object metadata

c. When you select the Login to SFDC, a popup shows with fields needed to login to your developer

d. When you select “Extract object metadata”

instance (User name, password, security token and anything else). The popup should have 2

options one for login, one for cancel

- If not yet logged in, then show the login popup

- If already logged in

1. A popup shows up with a drop down of all the objects in the SFDC org you just

logged into and 2 buttons (Extract, cancel)

2. Once the user selects a specific object in the drop down and clicks extract.

The google script uses the SFDC Metadata API to extract all the information

exposed about the object, its fields and field properties and writes it to a new

tab (note label the tab with the object name).

Hi,

 

  Need a visual force page .

 

 Having all account list as picklist , based on selected account a contact picklist(contacts related to particular account) should be shown ..Whenever a contact is selected a text field contains a phone number of the contact will be dispalyed.

 

Can any one please help in developing this.

 

Thanks in advance.

Hi,

 

  I have a requirement .

 

Whenever a text fied is changed(or entered text) the  other text field should be marked as required.

 

I used the following code but it is not happening.

 

<apex:page controller="sampleOne" >

    <apex:form >
        <apex:pageBlock >
          <apex:pageBlockSection >
                   <apex:inputText  label="name" />
                  <apex:actionSupport event="onchange" action="{!setName}"  rerender="counter" />
                    <apex:inputText required="true" value="{!Name}" label="name2" id="counter"/>
          </apex:pageBlockSection>
          </apex:pageBlock>
    </apex:form>

</apex:page>

 

 

 

public with sharing class sampleOne {

public boolean Name{get ;set ;}

  public void setName()
 {
   this.Name=true;
   System.debug('___________________________setname');
}
public boolean getName()
  {
   return Name;
   }
}

Hi,

 

 I have a custom object with fields name,phone number in salesforce accounts.

 

Whenever I enter details in one salesforce object , the other salesforce object also needs to be updated.

 

Can anyone please provide me the solution.

 

How to get WSDL and how to make SOAP call

 

Thanks in advance

Hi,
I have a custom object which contains a master detail relationship.
When I try to update records using import wizard the records are not updating ,showing 0 records updated though i used 1 digit id to update this..

Plz clarify me the below queris.

1)can we update master detail relationship with import wizard.

2)What is the main difference between import wizard and data loader other than number of records they handle.

3)what i sthe diff between Data Import WizardBETA and Import Custom Objects under Data Management.

Thanks,
Naveen

Hi,
I have a custom object which contains a master detail relationship.
When I try to update records using import wizard the records are not updating ,showing 0 records updated though i used 1 digit id to update this..

Plz clarify me the below queris.

1)can we update master detail relationship with import wizard.

2)What is the main difference between import wizard and data loader other than number of records they handle.

3)what i sthe diff between Data Import WizardBETA and Import Custom Objects under Data Management.

Thanks,
Naveen

Can anyone please help me in solving below queries.

 

 

1.Add check boxes to a list of records, a  check box in the heading , when the header check box is cheked all the check boxes in the list are check and vice versa.

2.Create a site for a visual force page and change the position of the controls in page with site template.

3.Download data thru apex in excel format.

 

 

Its urgent please..

 

Thanks in advance

<apex:page standardController="Account" extensions="testPicklist">
      <apex:tabPanel >
      <apex:tab label="accounts" name="accounts" id="tab1" >
      
      <apex:pageblock >
                   <apex:pageBlockSection title="">
                   <apex:pageBlockTable value="{!lstAccounts}" var="acc"  >
                   <!--<apex:column value="{!acc.CreatedBy}"/>-->
                   <apex:column value="{!acc.AccountNumber}"/>
                   
                   </apex:pageBlockTable>
                   </apex:pageBlockSection>
             </apex:pageblock>
             </apex:tab>
      <apex:tab label="contact" name="contacts" id="tab2"/>
             </apex:tabPanel>
             
             
         
 </apex:page>

 

public class testPicklist
         {

    public final Account acct;
    List<Account> lstAccounts{get; set;}
    public testPicklist(ApexPages.StandardController controller)
           {
            acct=(Account)controller.getRecord();
           }
           public List<Account> getlstAccounts()
           {
           lstAccounts.add([select name,id from Account]);
           return lstAccounts;
           }
    
       }

 

 

while itry to execute this code Im getting System.NullPointerException: Attempt to de-reference a null object  error error .

 

Can  any one please help..urgent

 

 

I have around 4000 records, and I have to update a custom field (e.g Rating) in Account object, where condition is that if value in the field is 10 update/change to "A" and if the value in a field is 20 change to "B" in all the records.

what is the best way i.e SOQL or data (Data Loader), I am new to SOQL

Thank you very much 
Hi everyone,

So this is my first attempt at writing an Apex trigger and it seems to be working fine in the Sandbox.
I've now got a couple of questions that I'm hoping you could help me with:

1. You can see the trigger is simple enough, just a bunch of IF statements but it does the job. As I'm only starting in this area I'm unsure if I took the right approach and if it even complies with best practices used with Apex triggers.
Could or should I have used FOR loops instead? Would any code variations be more suitable?
Are there any risks of falling in an endless loop?

2. How do I go about creating Test Classes for this trigger?

Any help with the above is welcome! Thanks a million guys!

Code snippet
Hi all,

I'm trying to write the below formula in a boolean formula field:
INCLUDES($User.Roles__c,Involved_Role__c)

Roles__c is a multiselect picklist. Involved_Role__c is a text field.

When I try to save the system throw this exception:
Error: Incorrect parameter type for function 'INCLUDES()'. Expected Text Literal, received Text

I tried to use the TEXT function on Involved_Role__c field, but it doesn't work.

How can I troubleshoot this issue?

Thanks in advance.
Edoardo
1.My visualforce page is
<apex:page controller="SendRecordsToPaaage"  tabStyle="Account">
  
  <apex:pageBlock title="AccountDeails" >
  
  <apex:pageBlockTable value="{!accList}" var="details">
     <apex:column value="{!details.name}"/>
    <apex:column value="{!details.accountnumber}"/>
  </apex:pageBlockTable>
  </apex:pageBlock>
  
</apex:page>

2. My controller is
public class SendRecordsToPaaage {
    
    public List<Account> accList{get;set;}
    public void getAccList() {
    
   accList=[select name,accountnumber from account];
      
      
    
     
    }

}


Give me solution for this please......
hi,
I want to write a code to get next Scheduled dates from given cron expression.For eg.
If input is : 0 0 20 * * ?
then output should be: Wednesday, May 27, 2015 8:00 PM
                                  Thursday, May 28, 2015 8:00 PM
                                  Friday, May 29, 2015 8:00 PM
                                  .
                                  .etc.
Please help to resolve this.
Thank you.
 
This is my scenario. I am using the Contracts object in my application. I do not want to show certain fields like status in my page. But it's a required only field . How do I work around this ?
hi!
for a week now i am trying to connect to my Salseforce account just to retrive my data into my java aplaction and i cant seem to get it to work.
i read all over the internet and followoed every example i could find and nothing helped.

what i did so far is:

opened a developer account.
created an app with Oath2 authentication. (i do not have a callback server so i didn't know what to use).
what I'm trying to do is this:
connect to Salseforce.
retrieve all my leads created between 2 specific dates

I'm not even sure what will be the best API for that manner...
I would really appreciate some assistance.

thank you!
​Daniel
I want to write some code to add and remove fields on custom objects via Apex, SOQL, the API, or somehow programmatically rather than altering objects using the Salesforce UI. Is there any Force equivlent to a SQL ALTER TABLE statement? Is it possible to alter (add/remove fields on) custom objects using only code?
Need help with the below requirement.

When i create an opportunity in SFDC it should get created in SAP with same ID and also it should delete an opportunity when i do in SFDC.

Any help would be highly appreciated.

Thanks and Regards
 
Hi all,

Is there a way I can create a button that once clicked, will update a picklist field called Stage__c to the value 'Recieved' and a date/time field called Recieved_Date__c to the the exact date and time the button was pressed? 

I think this can be done through Javascript but help would be apreciated.

Thanks
what are the precautions to be taken while deactivating a user???
  • February 16, 2015
  • Like
  • 0
Hello,

I just thought I'd post a question to confirm something which has come up for discussion and which I did not consider as being a possibility when inserting data.
- I have a client which is inserting data into a custom object via the Standard Soap API and dates they enter are not corresponding to their thoughts on how the data should be entered.  The value is enterering with a value 1 day less than the dates they provide.  The clients timezone is GMT + 8 hours.
- To my understanding the date should enter exactly as it's provided in the XML as it's not a Date/Time field and timezone is irrelevant.
- I've asked the client to provide the SOAP XML in order that I can verify what is provided is different than the final value in SFDC but the client is unable to provide the XML (for some reason debugging cannot be setup for this).
On testing this myself using SOAP UI & changing my SFDC User's timezone  & even changing the time for my own laptop the value I enter in the SOAP request inserts exactly as I enter it without any changes.

I note the following details that issues can occur with dataloader sometimes. I presume it's correct that no impact can occur for dates when inserting via a SOAP request? That dates should just enter exactly as received.

https://help.salesforce.com/HTViewHelpDoc?id=faq_import_general_wrong_date.htm&language=en_US

Thanks for any help clarifying on this.
Hi,
 I would like find all dependancies related to every component while deploying(to avoid deploy errors)..
Is there any way to find this. In change sets we have option view/add dependancies option.
How can this same can be achieved by writing any code or any other way apart from change sets.
i.e. While deploying an apex class I would like to see fields,objects etc..that is used in this class.

Note:it is very urgent and your help is really appreaciated. 

Thanks in Advance.

Regards,
Naveen.
Hi ,

I tried creating page layout using metadata api using the code
  MetadataService.MetadataPort service = new MetadataService.MetadataPort();  
  service.SessionHeader = new MetadataService.SessionHeader_element();
  service.SessionHeader.sessionId = UserInfo.getSessionId();

    MetadataService.Layout layout = new MetadataService.Layout();
    layout.fullName = 'Case-My Layout';
    layout.layoutSections = new List<MetadataService.LayoutSection>();
    MetadataService.LayoutSection layoutSection = new MetadataService.LayoutSection();
    layoutSection.editHeading = true;
    layoutSection.label = 'Description Information';
    layoutSection.style = 'TwoColumnsTopToBottom';
    layoutSection.layoutColumns = new List<MetadataService.LayoutColumn>();
    MetadataService.LayoutColumn layoutColumn = new MetadataService.LayoutColumn();
    layoutColumn.layoutItems = new List<MetadataService.LayoutItem>();
   MetadataService.LayoutItem layoutItem1 = new MetadataService.LayoutItem();
      layoutItem1.behavior = 'Required';
      layoutItem1.field = 'Contact';
      layoutColumn.layoutItems.add(layoutItem1);
   layoutSection.layoutColumns.add(layoutColumn);
   layout.layoutSections.add(layoutSection);
   List<MetadataService.SaveResult> results =     
        service.createMetadata(
        new MetadataService.Metadata[] { layout });    
  System.debug(results[0].errors[0].message);
 
I get the error message as USER_DEBUG [106]|DEBUG|Layout must contain an item for required layout field: ContactId  .
I would be grateful if someone could help me solve this issue.

Thanks
Hi All,

We have a situation to deploy client organization complete metadata (Like Packages, Objects, Classes, Sites etc..) to free developer edition since client org licences are going to expire and they are not ready to renewal those licences. But in future they might need these org, so we are trying to deploy the all components to DE. We have considered following options.

1. CloudAlly, a third party tool, we can take a backup of org(metadata and data) but we can't restore to another org.
2. Force.com IDE, we can take a backup of org(metadata but not installed packages), we need to re install all installed packages in developer edition (we have some paid packages so customer is not ready to pay again for these packages).

Please suggest the best ways to do this :)

Best Regards,
Mithun.
Hi,
Can any one help me in converting String to DateTime in apex.
Im able convert below format.

DateTime dt = DateTime.parse('11/6/2014 12:00 AM');

If I use below format Im getting error.

Datetime dt = DateTime.formatGmt('09-Dec-2014 10:43 AM');

System.TypeException: Invalid date/time: 09-Dec-2014 10:43 AM.

Thanks in advacne.

Regards,
naveen.


 
Hi Guys,

We have a requirement. can someone please help us .

There is a  Custom object with name "xxxxxx__c".  so whenever a new record is being created users will attach certain number of documents(say 2/3). Approximately per month itself around 3000 records will be created.  So due to space constraints i dont think it is possible to store all the 3000 records with their respective attachments in Salesforce ORG .

So is there anyway by which we can store all the related documents in some other 3rd party server and retrieve whenever the users would like to view the attachments ? 

Its very urgent and someone please help me ! ! 

 
Hi, I have requirement like this.
I have a pick list field with few values.i want to add some more picklist value to this field from excel sheet. Not like this object>field>edit...
Is there any chance to do this..

Thanks in advance.

Why we can add time-dependent workflow actions for

           1) When a record is created, or when a record is edited and did not previously meet the rule criteria

            2) Only when a record is created

but Why we cannot add time-dependent workflow actions for Every time a record is created or edited ?

please give me explanation