• sham_1
  • NEWBIE
  • 85 Points
  • Member since 2008

  • Chatter
    Feed
  • 3
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 26
    Replies

Hi!

i have an issue on html template email.

when i put a attachment (pdf or a image) on the html template email and do a mass email, the attachment goes on html..

 

This is normal?

Hi,

 

I am working with Customer Portal,When I login as Customer Portal User I am

able to see only Required filelds in Custom Objects,and Some fields inStandard Object.

Is there any way to enable the other fields to Customer Portal User.

 

If any one know about this,Please help me.

 

  • May 06, 2011
  • Like
  • 0

 

global class OpportunityStatusReport implements Schedulable {
 
    public static final String EMAIL_TEMPLATE_ID = '00XP0000000HucQ';
    public List<AggregateResult> openOpps = new List<AggregateResult>();
    public Messaging.SingleEmailMessage [] singleEmails = new List<Messaging.SingleEmailMessage>();
    public Messaging.Email[] allEmails = new List<Messaging.Email>();
    
  
    global void execute (SchedulableContext SC)
    {
        // Gets the list of the opportunity status report recipients. Only active users with open opportunities will get an email.
        openOpps = 
        [
            SELECT o.OwnerId 
            FROM Opportunity o
            WHERE o.Owner.isActive = true
            AND o.isClosed = false
            GROUP BY o.OwnerId
        ];
        
        if(openOpps.size() > 0)
        {
            // Creates a personalized email for each recipient
            for (AggregateResult opp : openOpps)
            {
                Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
                mail.setTargetObjectId((String)opp.get('OwnerId'));
                mail.setTemplateId(EMAIL_TEMPLATE_ID);
                mail.setSaveAsActivity(false);
                singleEmails.add(mail);
            }
            
            for( Integer i = 0; i < singleEmails.size(); i++ )
            {
                allEmails.add(singleEmails.get(i));
            }
            
            if (allEmails.size() > 0)
            {
                Messaging.sendEmail( allEmails );
            }
        }
    }
}

 

 

System.UnexpectedException: Not Serializable: LIST<Messaging.Email>

 

---

 

Hey guys,

how can I fix the exception? (Making the list transient doesn't solve the problem)

 

Thx for your help

Josh

Hi Boards,

I have some data populated in richtext Area fields in sandbox.

I would like to migrate them to production.

 

RichTextArea contains embedded images, I would like them to be exported them as is.

I took the export using DataLoader and the csv file shows the path of the image instead of the image data. How do I accomplish the export  ?

 

Any insights will be appreciated.

 

Thanks,

  • August 10, 2011
  • Like
  • 0

Hi All,

 

We have managed package installed on a sandbox. I have created some workflows on a managed object in sandbox.

I have created some workflows on the managed object.

I would now like to migrate the workflows in production. But I don't find the workflows in eclipse.

 

Is it possible to migrate workflows created on a managed object. ?

Hey guys,

I have created a custom object and respective tab. When I go to the tab and create a list of the objects, only the object ID can be clicked to link to the detial of that object.

For example, with a standard object (say Lead), I can pull a leads list, then click on any of the fields (first name, last name, company, etc...) to link to the record detail. For this custom object/tab, I don't seem to have that behavior. Is there any way to force such a behavior?

Thanks in advance!!!!!

D

Does anyone know how to export the meta data of all Knowledge data categories?  There are close to 400 in the system and we will need to use the unique names to match to the articles in a spreadsheet for importing.

 

Thoughts?  I tried looking in Data Loader and couldn't find what I am looking for.

Hello,


I am creating a multiple file upload, one of the thing that is failing for me is "Calling controller method from javascript, Golbal Remote call for is not working"

So I created a simple example to test and that not working either, Here is my Controller class and page, Its not showing me a alert on page load.  What am I doing wront here ?

Class
===========

global with sharing class myControllerTest {
    
    @RemoteAction
    global static String getID(String parentId){
        return parentId;
    }
}




Page
============

<apex:page >
<head>
   <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"/>
   <script type="text/javascript">
     j$=jQuery.noConflict();
     
     myControllerTest.getID('Hello Salesforce', function(result,event){
        if(event.status == true){
            alert(result);
        }else{
            alert(event.message);
        }
    }, {escape: false});
   </script>
</head>   
  <!-- Begin Default Content REMOVE THIS -->
  <h1>Congratulations</h1>
  <!-- End Default Content REMOVE THIS -->
</apex:page>

Hi all,

            I had created a customer portal using my Developer org, but it's having some Login related  problems, whenever i try to login as new user, i first had to provide email address & on that email address salesforce provides first time password but in my case i'm only getting error messages as

------------------------------------------------------Email--------------------------------------------------------------

We appreciate your interest in registering for an account with "My company name" Customer Portal. However, your signup was not completed due to temporary technical reasons detailed below. Please contact the portal administrator if you have any questions.


Thank you,

'My company name'  Customer Support


Unfortunately, you are ineligible for registering an account at this time.

 

---------------------------------------------------------------------------------------------------------------------

 

so please provide me any solution for this.

Thanks in advance..........



Hi All,

 

We have managed package installed on a sandbox. I have created some workflows on a managed object in sandbox.

I have created some workflows on the managed object.

I would now like to migrate the workflows in production. But I don't find the workflows in eclipse.

 

Is it possible to migrate workflows created on a managed object. ?

Hi!

i have an issue on html template email.

when i put a attachment (pdf or a image) on the html template email and do a mass email, the attachment goes on html..

 

This is normal?

I'm pretty new to APEX, and am hoping someone might have some direction for me on this...

 

I'm trying to figure out how to copy the Lead Owner name to another user lookup field on the same Lead (fieldname=Sales_Developer__c) - when the lead owner changes, but only if the owner profile equals “Sales Developer”.

 

From what I understand of the Lead Owner field, you can’t extract the profile attribute directly from the Lead Owner field – so I’ve created a separate field called “Owner_Copy__c” (shout out to michaelforce and others for this code) – and then would like to reference the profile attribute from that new lookup field.

 

Anyway – I hope this makes sense. Here is the code I have so far to copy the user name to the Owner_Copy__c field:

 

 

trigger ownerCopy on Lead (before Insert, before Update) {

    // handle arbitrary number of opps
    for(Lead x : Trigger.New){

        // Has Owner changed?
        if (x.OwnerID != x.Owner_Copy__c) {

            // check that owner is a user (not a queue)
            if( ((String)x.OwnerId).substring(0,3) == '005' ){
                x.Owner_Copy__c = x.OwnerId;
            }

            else{
            // in case of Queue we clear out our copy field
                x.Owner_Copy__c = null;
            }
        }
    }
}

 

 

I’m stuck on figuring out how to restrict the process to only update the Sales_Developer__c field when the profile criteria is met.

 

Am I headed in the right direction – or how would you approach this?

 

I know the following isn’t valid code, but I’m wondering if I can do something like this also?:

 

 

if (x.Owner_Copy__c.Profile.Name == 'Sales Development') {
            x.Sales_Developer__c = x.OwnerId;
        }

        else{
            x.Sales_Developer__c = null;
        }

 

Thank you

 

Hi Migration Tool experts!!

 

I've just begun using the Migration Tool and after a lot of initial frustrations, I'm really pleased with just how much time it's been saving me.

 

Now the big question:  how to undeploy things.  I've put a bunch of metadata into a developer's org that I've piped out of two different production orgs.  This was a great use of this tool.  I can go and create a different developer's org if I want, but I was wondering if it were easy enough to just clear out all the customisations I've put in.  It's easy to get rid of anything relating to custom objects in this way, I'm sure.  But  I'd like to get rid of all customisations of every stripe on the standard objects.

 

The documentation is a little bit scant on this, other than making mention to destructiveChanges.xml.

 

Any tips?

 

Thanks!!

 

Hi,

 

I am working with Customer Portal,When I login as Customer Portal User I am

able to see only Required filelds in Custom Objects,and Some fields inStandard Object.

Is there any way to enable the other fields to Customer Portal User.

 

If any one know about this,Please help me.

 

  • May 06, 2011
  • Like
  • 0

Hi,

 

  Is it possible to render a string content as a visualforce markup?

  For example: I have a apex string which its content is '<apex:outputtext>test</apex:outputtext>'. I want to insert this string into a visualforce page and make it get rendered.

 

Thanks in advance,

Vinícius

This should be simple, but I'm having a hard time with it. I want to create a formula field that gives me the number of minutes between the record's CreateDate and LastModifiedDate. What does that formula need to look like?

 

Thanks for your help!

hello all,

 

I have a APEX class, with a webservice

 

 

global class ProductAdminWebService { 
...
...
   webservice static string goLive(string recordId, string status, string productRegion){ 
   ...
   ...
   }
 }

 

 

The only purpose why its a web service, so I can call from my custom button on VF page with a page refresh. It does not make any call outs. 

 

The webservice has a SOSL (NOT SOQL) querry and returns result when called from my custom button on VF page but returns nothing when called from my test method. Am I missing anything here? Below is the SOSL query:

 

 

 

List<List<SObject>> searchList;

searchList = [FIND :productRegion IN ALL FIELDS
    RETURNING 
                                                Product_Administration__c (id, Description__c, Product__c, Product_Region__c, AP_Price__c, Direct_Price__c, Dist_Price__c, LA_Price__c, Standard_Price__c, Schedule_Date__c WHERE Id= :recordId), 
                                                Service_Administration__c (id, Description__c, Product__c, Product_Region__c, AP_Price__c, Direct_Price__c, Dist_Price__c, LA_Price__c, Standard_Price__c WHERE Product_Administration__c= :recordId LIMIT 7)
                                              LIMIT 8];

 

 

 

This is urgent, as I need to deploy to production asap. Please help. 

I would like to create a button that changes the record type of a case . 

 

I have tried writing the javascript and scoured the web, but still cannot get it to work.  My code will update other fields if modified but not the recordtypeid.  Any suggestions?

 

{!REQUIRESCRIPT("/soap/ajax/13.0/connection.js")}

var undocase= new sforce.SObject("Case");
undocase.id = "{!Case.Id}";
undocase.RecordType = "01240000000QFLB";

var result = sforce.connection.update([undocase]);

if (result[0].getBoolean("success"))
{
    // Refresh window
    window.location.reload();
}
else
{
    alert("Error saving case");
}

Hi All,

 

We have a custom shipment object whose name is an autonumber.  Over the last few months it has starting skipping numbers at an alarming pace.  Does anyone know what could be causing this?  Could a Unit Test or Trigger be causing this?

 

TIA

 

--David

Is it possible somehow to set the background colour of a standard salesforce field.

 

My requirement is like this: I have a number field. On the basis of the count, I want to give a background colour to te field. For example if it is less than 30, than red, 30-45 than yellow, more than 45 than green.

Documentation like Understanding Execution Governors and Limits says that a managed package has a set of governor limits that are separate from the governor limits applied to the non-packaged source code in an org. This is the behavior we see in developer edition orgs: numbers are reported for the managed package(cve namespace) and non-packaged source code (default namespace) separately and no limits are exceeded and our tests all pass.

 

But after an upgrade of an org that we setup for a customer starting from a Trialforce snapshot, the counting appears to be combined and reported only under the non-packaged source code (default namespace) so that limits are exceeded and some of our tests fail.

 

Can anyne offer any insight into this problem? Below are fragments of debug log output that illustrate the problem. (There is mention of the cve managed package in both logs, just not in this fragment for the problem org.)

 

Thanks,

Keith

 

 

From the working (developer edition org):

 

 

02:22:24.379|CUMULATIVE_LIMIT_USAGE
02:22:24.379|LIMIT_USAGE_FOR_NS|(default)|
Number of SOQL queries: 0 out of 100
Number of query rows: 0 out of 50000
Number of SOSL queries: 0 out of 20
Number of DML statements: 5 out of 150
Number of DML rows: 5 out of 10000
Number of script statements: 189 out of 200000
Maximum heap size: 0 out of 3000000
Number of callouts: 0 out of 10
Number of Email Invocations: 0 out of 10
Number of fields describes: 0 out of 100
Number of record type describes: 0 out of 100
Number of child relationships describes: 0 out of 100
Number of picklist describes: 0 out of 100
Number of future calls: 0 out of 10

02:22:24.379|LIMIT_USAGE_FOR_NS|cve|
Number of SOQL queries: 6 out of 100
Number of query rows: 6 out of 50000
Number of SOSL queries: 0 out of 20
Number of DML statements: 1 out of 150
Number of DML rows: 1 out of 10000
Number of script statements: 442 out of 200000
Maximum heap size: 0 out of 3000000
Number of callouts: 0 out of 10
Number of Email Invocations: 0 out of 10
Number of fields describes: 0 out of 100
Number of record type describes: 0 out of 100
Number of child relationships describes: 0 out of 100
Number of picklist describes: 0 out of 100
Number of future calls: 0 out of 10

02:22:24.379|TOTAL_EMAIL_RECIPIENTS_QUEUED|0
02:22:24.379|STATIC_VARIABLE_LIST|
BusinessLogicBase:MONTHS:126
PaymentSpecificationPopulatorTest:BASE:4
PaymentSpecificationPopulatorTest:LUMP_SUM:8
PaymentSpecificationPopulatorTest:MONTHLY:7
PaymentSpecificationPopulatorTest:SCALE:4
PaymentSpecificationPopulatorTest:TODAY:4

02:22:24.379|CUMULATIVE_LIMIT_USAGE_END

 

 

From the failing (customer org:

 

 

01:35:40.307|CUMULATIVE_LIMIT_USAGE
01:35:40.307|LIMIT_USAGE_FOR_NS|(default)|
Number of SOQL queries: 6 out of 100
Number of query rows: 6 out of 50000
Number of SOSL queries: 0 out of 20
Number of DML statements: 6 out of 150
Number of DML rows: 6 out of 10000
Number of script statements: 631 out of 200000
Maximum heap size: 0 out of 3000000
Number of callouts: 0 out of 10
Number of Email Invocations: 0 out of 10
Number of fields describes: 0 out of 100
Number of record type describes: 0 out of 100
Number of child relationships describes: 0 out of 100
Number of picklist describes: 0 out of 100
Number of future calls: 0 out of 10

01:35:40.307|TOTAL_EMAIL_RECIPIENTS_QUEUED|0
01:35:40.307|STATIC_VARIABLE_LIST|
BusinessLogicBase:MONTHS:130
PaymentSpecificationPopulatorTest:BASE:8
PaymentSpecificationPopulatorTest:LUMP_SUM:8
PaymentSpecificationPopulatorTest:MONTHLY:7
PaymentSpecificationPopulatorTest:SCALE:4
PaymentSpecificationPopulatorTest:TODAY:8

01:35:40.307|CUMULATIVE_LIMIT_USAGE_END

 

 

I am wondering is there a way I can hide a specific value in a visualforce page using either controller or in Visualforce page.

 

Suppose I have original Picklist Values in setup :

A- 123

B-234

C-345

 

I want to Display only 2 values on a Visual force page.Like

 B-234

C-345

How can I acheive this?

 

Please put some code if it is possible.

  • May 03, 2011
  • Like
  • 0

Is there any limit to the number of entries in a set or list that can be used in an IN clause in SOQL?

 

 

List<Id>myIdList = ....

List<OpportunityLineItem>oliList = [select id, opportunityId, quantity
                                    from OpportunityLineItem
                                    where id in :myIdList];

 

Is there anythg that would prevent myIdList having 100, or 1000, or 5000 entries and still working with the SOQL query?