• Ady
  • NEWBIE
  • 105 Points
  • Member since 2008

  • Chatter
    Feed
  • 4
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 32
    Replies

I built a very simple apex class, based on a test class, to add a row of data to a database table:

 

Private class Invoice_Balance_Record_Inserter {
static void validateInvoice_Payment() {
Invoice_Balance__c i = new
Invoice_Balance__c(Name='I110811EP3-1', 
Invoice__c = 'a00U00000020IgSIAU',
Invoice_Balance_Amount__c=300);
insert i;
 }
}

 The code will run, either in system log or in force ide, but I don't end up with a record in Invoice_Balace__c.   Is there a way I can run this code that will result in a record being added?  thanks

Hi,

 

Can mobile configuration be ported from sandbox to production using Eclipse tool. I couldn't find any mobile related data in meta-data.

 

Anyone ?

 

thanks,

Amit

Is there anyway to remove/hide the standard Save & New button on the edit page of Salesforce.

 

I don't want this action for my User and I don't have control over the standard edit page layout of Salesforce unlike the detail page layout. Please let me now if this is possible in some ways in the standard Salesforce page itself.

 

Regards,

Karthik.


I have created visual force page using standard controller, In that I have a multipicklist and this should reflect the value based upon the recordtype in contact sobject. I know there are no such options in Vforce page. so i tried hardcoding the value using javascript but Iam not able to call the multiselect picklist in the script function.

Please give your suggestion.

 

Vforce Page: <apex:page standardController="Contact"> <apex:form > <apex:pageBlock title="Try" mode="Edit"> <apex:pageBlockSection title="Try It Again "> <apex:pageBlockSectionItem id="sec_Rank"> <apex:outputLabel >Rank</apex:outputLabel> <apex:inputField value="{!Contact.Rank__c}" id="Rank" onchange="javascript&colon;change()"/> </apex:pageBlockSectionItem> </apex:pageBlockSection> </apex:pageBlock> </apex:form> <script language='JavaScript'> change(); function change() { try{ alert('{!$Component.Rank}'); }catch(e);{alert(e);} } </script> </apex:page>

 Thanks

 

  • July 22, 2009
  • Like
  • 0

Good Afternoon:

 

Here is my situation:

 

I have one custom object Sites__c

 

I have a second custom object Subscriber__c.

 

Subscriber__c has a custom lookup field Address_ID__c

 

Address_ID__c.Fiber_Release__r is the same value as Site__c.Name although the two objects are not related.

 

What I want to do is to count the number of Subscriber__c records there are for a given Site__c using the logic above but without doing lookups and Master-Details.

 

Subscriber__c records are updated monthly via a bulk upsert process using the Apex Data loader and requires too much manual work for lookups.

 

I have no idea where to begin. Any help is appeciated.

 

Thanks,

 

Matt

Hi all,

 

I'm using the streaming api and see ive hit the "Maximum number of events per day" of 10k.

 

I'm not really sure why I would've hit this limit.  Is there some place I can see when my 10k will reset or what used up my 10k?

 

Thanks!

  • March 28, 2012
  • Like
  • 0

Have any of you worked with the EncodingUtil.base64Decode() method? I have a client Carte Financial who is wanting to send an email automatically when a new file attachment has been added. The Body of the file attachment is in Base64 format. But all the examples that I've researched on the Salesforce blogs don't work. My current code is:

 

    for(Attachment attch : attchSubset) {

          

           // Create the attachment

           Messaging.Emailfileattachment efa = new Messaging.Emailfileattachment();

           efa.setFileName(attch.Name);

 

Get an error here stating that there is an invalid Base64 character and can’t convert it. If I just add the attachment with the Body in its Salesforce format, it doesn’t show properly.

           // Decrypt the attachment body and then set it.

           Blob body = EncodingUtil.base64Decode(attch.body.ToString());

           efa.setBody(body);

                   

           Messaging.Singleemailmessage mail = new Messaging.Singleemailmessage();

           list<String> emailAddr = new list<String>();

           emailAddr.add(mapContact.get(attch.ParentId).Email);

           mail.setToAddresses(emailAddr);

           mail.setPlainTextBody('Hi!');

           mail.setFileAttachments(new Messaging.EmailFileAttachment[] {efa});

          

           // Send the Email Message

           Messaging.SendEmailResult[] r = Messaging.sendEmail(new  Messaging.Singleemailmessage[] {mail});

    }

I built a very simple apex class, based on a test class, to add a row of data to a database table:

 

Private class Invoice_Balance_Record_Inserter {
static void validateInvoice_Payment() {
Invoice_Balance__c i = new
Invoice_Balance__c(Name='I110811EP3-1', 
Invoice__c = 'a00U00000020IgSIAU',
Invoice_Balance_Amount__c=300);
insert i;
 }
}

 The code will run, either in system log or in force ide, but I don't end up with a record in Invoice_Balace__c.   Is there a way I can run this code that will result in a record being added?  thanks

I have three custom fields for one built-in object say ObjA. I would like to fiell Custom Field C when end-user changes values of custom field A and/or B in the edit form of ObjA, before the object is saved.

 

I will call javascript function to do that.

 

What is the easiest way to do this? I am new to Salesforce. I expect something like this: create a javascript file with my functions, associate it with the object edit form (maybe some customization to the object/form).

 

Thanks,

We would like to send out an email to our accounts to verify all of the info for the contacts on the account. I understand that we can't email an account because there's not an email associated with it.

 

Preferably, we want to send one email to the owner and include all of the contact info for each contact in one email. Is there a way to email one contact and add all of the other contact info to the same email? If not, has anyone used any other tools that make this possible?

 

Thanks for the help,

 

Wendy

Hi,

 

Can mobile configuration be ported from sandbox to production using Eclipse tool. I couldn't find any mobile related data in meta-data.

 

Anyone ?

 

thanks,

Amit

I am generating a list of accounts in a Visualforce Page and I am trying to style it like the Recent Items list. Is there a way to access the icons, ie if the item on the list is an Account than a folder appears next to it? I have found where the image is stored but its appears as one larger image with all the icons(contact, opportunity, etc.) in it. Any ideas?

I have a custom object:  AccountSetup__c.  On the default page layout for this object I have a section that contains a VisualForce page that starts with:

 

<apex:page title="Account Setup Process Management"
           standardController="AccountSetup__c" extensions="AccountSetupControllerExtension"
           sidebar="false" showHeader="false">
etc.....

 

Here's the question:  What SObject fields are freely accessible to the extension controller via StandardController.getRecord()?  The fields on the outer page layout?  The fields on the inner VisualForce page?  A union of these fields?  It is not clear what the answer is and my results are quirky.  The constructor of my extension controller:

 

    public AccountSetupControllerExtension(ApexPages.StandardController stdController) {
        m_as = (AccountSetup__c)stdController.getRecord();

etc.....

 

In other words, what fields are pre-populated in m_as?

 

Thanks!


Dave

 

  • June 08, 2010
  • Like
  • 0

Hi All,

 

I have created a Record Type for Opportunities. I have decided against using a Record Type so I now want to delete it.

I clicked Del and it lists the profiles that are using the RT. I have edited each profile, resetting the Record Type back to Master.

 

This works except for Standard Platform User. This profile does not have an option to set the RT for the Opportunities object. Opportunities is not listed at all for this profile.

 

I am now stuck with an unwanted RT. I can't delete it as SF says the profile is using it as the default.

 

Any ideas?

 

Thanks.

 

 

- Andy

 

Is there anyway to remove/hide the standard Save & New button on the edit page of Salesforce.

 

I don't want this action for my User and I don't have control over the standard edit page layout of Salesforce unlike the detail page layout. Please let me now if this is possible in some ways in the standard Salesforce page itself.

 

Regards,

Karthik.