• Keith654
  • NEWBIE
  • 25 Points
  • Member since 2010

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 24
    Questions
  • 39
    Replies

Can anyone confirm that this setting is preserved when a managed package is installed?

 

This old post:

 

http://boards.developerforce.com/t5/AppExchange-Directory-Packaging/Removing-items-from-managed-package/td-p/38041

 

includes the phrase "Track Field History:  These attributes are subscriber-controlled" but I can't find a definition of what "subscriber controlled" means.

 

Thanks,

Keith

The conventional way of providing extension points to product code (such as a controller class or supporting business logic class) is to define an interface and then allow an extension class that implements this interface to be instantiated by the product code just using the class name supplied as a string. This keeps the product code independent of the extension code (allowing separate compilation and packaging). See the idea Allow Apex code customization of a managed package for a bit more information.

 

This mechanism is not supported in Apex today. It looks like the only general approach is to take a copy of the product code and hack in the changes and accept the many negative consequences.

 

If you have other solutions to this problem - even if they only address specific cases - please reply to this.

 

Thanks,

Keith

 

I'm just starting some work on this and am wondering if anyone has recent experience they are willing to share.

 

For example are FileNet WSDLs/Schemas too much for Wsdl2Apex? Other insights?

 

Thanks,

Keith

I'd appreciate input on the following use case which I would assume is a fairly common one.

 

I am building a customization project that uses objects from an installed managed package. As this is a long-term project I'm keeping the customizations in SVN via the Eclipse Force IDE. So for example, additional data fields that I add are nicely handled via the (package.xml) CustomField metadata component type in that they can be extracted from the org and then committed to SVN. But I'm puzzled about how to handle profiles, be they edits of the managed package ones or new ones created for the customization project.

 

Based on the documentation and posts such as this Failed to retrieve custom profile to Eclipse 3.3, the parts of the profile that are returned when the Profile metadata component type is used are filtered by the other items being retrieved. But In my case what I need is all the profile settings, both those for the components in the managed package (because I'm customizing which fields etc from that managed package are being shown and how), plus the profile settings for my added fields. All I get by default are the latter ones which are a small fraction of the total set I need.

 

I note that although the wildcard matching for members (the "*") does not match components in the managed package it is possible to explicitly name the items (where the names have to include the namespace prefix) so by explicitly naming all the components in the managed package it might be possible to also retrieve all the profile settings. But that is a scarily fragile way to go and leaves you with an Eclipse project where 99% of the files are unwanted ones just requested to cheat the API.

 

The only work-around I can think of is to write some Java code that uses the Metadata API to first identify all the components (both in the managed package and in the customization project), then requests them all, but ultimately throws everything away except the profiles. This might only take a few hours to do, but it would take a while longer to test to be sure that all the profile settings were included.

 

So if I've missed an obvious way to do this or if you have any other insight please comment.

 

Thanks,

Keith

Here is a contrived example of a problem I have where I have a complicated expression that I'd like to evaluate once per table row using a variable. Instead of v2 corresponding to the current value of v1, it corresponds to the last row value of v1:

 

<apex:pageBlockTable var="v1" value="{!sobject}">
    <apex:variable var="v2" value="{!v1.StyleField}"/>
    <apex:column value="{!v1.ValueField}" style="{!v2}"/>
</apex:pageBlockTable> 

Does anyone have any insight into this or ways to get variables to work in this context? I haven't found anything in the documentation about this case.

 

Thanks,

Keith

I have two classes that are not visible in the developer web UI but appear in the Force IDE when I do a "Refresh From Server" (and therefore will end up in SVN and other orgs I push the code into).

 

Running this query via execute anonymous:

 

ApexClass[] cs = [select Name, Status from apexclass where Status='Deleted'];
for (ApexClass c : cs) {
    System.debug(c);
}

shows that the two classes have a status of 'Deleted' whereas all other classes have a status of 'Active'. Attempting to update or delete via execute anonymous returns a "DML not allowed on ApexClass" error.

 

Does anyone know how to get rid of these classes?

 

Thanks,

Keith

I have a Visualforce tab that has a "Choose a Home Page Custom Link to show as a splash page the first time your users click on this tab" set. The custom link has the "Display in existing window with sidebar" behavior set and displays a conventional Visualforce page.

 

This mechanism was working until my org's UI changed to the new Winter 11 UI. Now rather than just the splash page being displayed in the main part of the page, both the header and sidebar are repeated together with the splash page.

 

Please comment if this mechanism is either working or failing for you in Winter '11.

 

Thanks,

Keith

 

 

Thanks to feedback on "Salesforce" or "Salesforce Platform" for profiles in a Trialforce app? I have changed the profiles in my managed package to be based on the "Salesforce Platform" User License.

 

However, when I now use the normal package installation process the profiles in my package are no longer presented in the package installer's "Step 2. Choose security level" whether the org's profiles are based on "Salesforce" or "Salesforce Platform". The only options offered are "No Access" and "Full Access". When my profiles were based on "Salesforce" the profile settings in my package were included in the Access Level drop-downs. My profiles have detailed settings that I need to carry into the org's profiles for the correct configuration of the app.

 

I note that the user under which I am doing the installation belongs to the profile "System Administrator" that is associated with the "Salesforce" license and wonder if this is the cause of the problem.

 

Any insight into or better still solutions to this problem appreciated,

Keith

 

 

 

I have 4 custom profiles in my application that is packaged and installable via Trialforce. But I based those profiles on the "Salesforce" User License and now find that although my Trialforce package has an LMA license limit of 5 users I get a "All of your user licenses are currently in use by active users" when I attempt to associate an additional user with one of my custom profiles. It seems like some other limit - presumably on the "Salesforce" User License - is kicking in.

 

I haven't found a good reference on these two User License types and would appreciate a link if anyone has one.

 

Should I have based my profiles on the "Salesforce Platform" User Licence.

 

Help appreciated,

Keith

The initial version of our package was updating the LMA (creating a license etc) when a Trialforce install was done but a newer version of the package is not updating the LMA. As far as I can see the newer version is correctly associated with our LMA org (AKA the LMO).

 

Any suggestions on what could be wrong?

 

Thanks,

Keith

I have been asked to turn a link off when a trial user is accessing our package. (We are using Trialforce and the LMA.) I see the method:

 

    UserInfo.isCurrentUserLicensed('namespace')

 

but am looking for confirmation that it returns false for "Trial" users and true when the trial is converted to "Active" via the LMA.

 

Thanks,

Keith

A customer has asked if it is possible to go back to the previous version of a managed package if a blocker bug is found after a deployment. (Uninstalling and reinstalling the previous version is one approach but that means a lot of manual steps to get the data reloaded in the correct master before detail order and bigger ordering problems in self-referencing objects.)

 

I could not find anything on this subject - any insights anyone?

 

Thanks,

Keith

 

 

We want to change the labels used for Contact and Account in our packaged application to Person and Organization respectively because that is the appropriate terminology in our business domain. Our expectation is that our users will not be using other CRM oriented applications at the same time.

 

It is possible to use Setup -> Customize -> Tab Names and Labels -> Rename Tabs and Labels to make this change interactively. But so far I have not found any way to package this change or to get it copied into the Eclipse IDE so that it can also be committed to SVN.

 

Can this renaming be packaged? If so please provide a link to instructions on how to do it.

 

Thanks,

Keith

Posts like this:

 

http://community.salesforce.com/t5/AppExchange-Directory-Packaging/Can-Custom-Buttons-and-Links-be-packaged/m-p/141065

 

say that custom buttons and links can be packaged. Can anyone confirm and point to documentation on how to package a custom button added to a custom object from a managed package?

 

The Eclipse IDE will recognize a custom button added to say Contact, but it doesn't seem to recognize a custom button added to say xyz_CustomObject__c from a managed package. And I can't find any documentation that covers this case.

 

Thanks,

Keith

I have a few pages in a managed package created for a site. I was including the site template in my managed package and when the managed package was installed and hooked up to the site the pages worked. But when I try to use the pages with the site template that is in the org that the managed package is installed into (so that the template can be customized) I always get the "Authorization Required" page.

 

This is what one of my managed package pages looks like:

 

<apex:page showheader="false" standardstylesheets="true">
    <apex:composition template="{!$Site.Template}">
        <apex:define name="body">
            <!-- Content goes here. Even failes with just static text output here. -->
        </apex:define>
    </apex:composition>
</apex:page>

 

I have seen and acted upon the posts about checking the CRUD security and FLS and about enabling Visualforce page and class access for the site with no success.

 

There are these two posts that may be relevant:

 

Any insights appreciated.

 

Thanks,

Keith

We would like to go "managed released" as late as possible in our development and so submit our "managed beta" to the security review process that is a pre-requisite of being listed on the AppExchange (paid product).

 

But the "Security Review" link "Start Review" only appears next to the "Your Uploaded Packages" list in the "Publishing" tab of the AppExchange. And it appears that "managed beta" packages cannot be added there.

 

I tried creating an unmanaged package in the same org, but now that the namespace prefix is set the unit tests fail (because of the automatic injection of the namespace prefix) and so the unmanaged package cannot be uploaded.

 

I have not found a clear statement on "managed released" vs "managed beta" in the documentation so would appreciate a pointer to such a statement or some other definitive answer to this question.

 

Thanks,

Keith

 

 

 

My deploy from Ant failed this morning to a new "Developer Edition" org with this error; I have a few custom fields added to the User object. This deployment has been working fine and is run very frequently because we use continuous integration.
 
Does anyone have insight into this error?
 
Thanks,
Keith

 

My deploy from Ant failed this morning to a new "Developer Edition" org with this error; I have a few custom fields added to the User object. This deployment has been working fine and is run very frequently because we use continuous integration.

 

I have tried for several hours to work around this with no success. Does anyone have insight into this error?

 

Thanks,

Keith

 

PS This is a duplicate of this post:

 

http://community.salesforce.com/t5/General-Development/sf-deploy-failure-quot-Error-objects-User-object-User-Entity/td-p/189682

My deploy from Ant failed this morning to a new "Developer Edition" org with this error; I have a few custom fields added to the User object. This deployment has been working fine and is run very frequently because we use continuous integration.

 

Does anyone have insight into this error?

 

Thanks,

Keith

 

This post is to hopefully help anyone else who has this problem.
We had a bug that a warning message of "The content of elements should consist of well-formed character data or markup. at line 33" appeared occasionally in a apex:pageMessages output of Visualforce page.
The first breakthrough was the realization that the message only appeared immediately after the page had been edited. But there was nothing obviously wrong on line 33 of the page or any of the components it included. So the only way to narrow this down was to comment out parts of the page.
The problem turned out to be an invalid comment in a component where:
    <-- Overpayment/underpayment mode -->
should have been:
    <!-- Overpayment/underpayment mode -->
Both the component and page saved correctly, but this mistake caused the warning the first time the page was used.

 

This post is to hopefully help anyone else who has this problem.


We had a bug that a warning message of "The content of elements should consist of well-formed character data or markup. at line 33" appeared occasionally in a apex:pageMessages output of Visualforce page.


The first breakthrough was the realization that the message only appeared immediately after the page had been edited. But there was nothing obviously wrong on line 33 of the page or any of the components it included. So the only way to narrow this down was to comment out parts of the page.


The problem turned out to be an invalid comment in a component where:
    <-- Overpayment/underpayment mode -->
should have been:
    <!-- Overpayment/underpayment mode -->


Both the component and page saved correctly, but this mistake caused the warning the first time the page was used.

I have a managed beta package that includes profile settings. A System Administrator can access the application normally and the deployed profile settings appear correct. But a user assigned to one of those profiles cannot access the application's custom objects and therefore the custom object tabs.

 

This problem has appeared since na7 was upgraded to the Summer '10 release.

 

Note that unfortunately I cannot deploy the previous version of the package to confirm that it is a platform issue because that earlier version fails to deploy due to an incorrect type setting on a component attribute that the platform now spots.

 

Has anyone else had this sort of object access problem?

 

Thanks,

Keith

I'd appreciate input on the following use case which I would assume is a fairly common one.

 

I am building a customization project that uses objects from an installed managed package. As this is a long-term project I'm keeping the customizations in SVN via the Eclipse Force IDE. So for example, additional data fields that I add are nicely handled via the (package.xml) CustomField metadata component type in that they can be extracted from the org and then committed to SVN. But I'm puzzled about how to handle profiles, be they edits of the managed package ones or new ones created for the customization project.

 

Based on the documentation and posts such as this Failed to retrieve custom profile to Eclipse 3.3, the parts of the profile that are returned when the Profile metadata component type is used are filtered by the other items being retrieved. But In my case what I need is all the profile settings, both those for the components in the managed package (because I'm customizing which fields etc from that managed package are being shown and how), plus the profile settings for my added fields. All I get by default are the latter ones which are a small fraction of the total set I need.

 

I note that although the wildcard matching for members (the "*") does not match components in the managed package it is possible to explicitly name the items (where the names have to include the namespace prefix) so by explicitly naming all the components in the managed package it might be possible to also retrieve all the profile settings. But that is a scarily fragile way to go and leaves you with an Eclipse project where 99% of the files are unwanted ones just requested to cheat the API.

 

The only work-around I can think of is to write some Java code that uses the Metadata API to first identify all the components (both in the managed package and in the customization project), then requests them all, but ultimately throws everything away except the profiles. This might only take a few hours to do, but it would take a while longer to test to be sure that all the profile settings were included.

 

So if I've missed an obvious way to do this or if you have any other insight please comment.

 

Thanks,

Keith

I have two classes that are not visible in the developer web UI but appear in the Force IDE when I do a "Refresh From Server" (and therefore will end up in SVN and other orgs I push the code into).

 

Running this query via execute anonymous:

 

ApexClass[] cs = [select Name, Status from apexclass where Status='Deleted'];
for (ApexClass c : cs) {
    System.debug(c);
}

shows that the two classes have a status of 'Deleted' whereas all other classes have a status of 'Active'. Attempting to update or delete via execute anonymous returns a "DML not allowed on ApexClass" error.

 

Does anyone know how to get rid of these classes?

 

Thanks,

Keith

Thanks to feedback on "Salesforce" or "Salesforce Platform" for profiles in a Trialforce app? I have changed the profiles in my managed package to be based on the "Salesforce Platform" User License.

 

However, when I now use the normal package installation process the profiles in my package are no longer presented in the package installer's "Step 2. Choose security level" whether the org's profiles are based on "Salesforce" or "Salesforce Platform". The only options offered are "No Access" and "Full Access". When my profiles were based on "Salesforce" the profile settings in my package were included in the Access Level drop-downs. My profiles have detailed settings that I need to carry into the org's profiles for the correct configuration of the app.

 

I note that the user under which I am doing the installation belongs to the profile "System Administrator" that is associated with the "Salesforce" license and wonder if this is the cause of the problem.

 

Any insight into or better still solutions to this problem appreciated,

Keith

 

 

 

I have 4 custom profiles in my application that is packaged and installable via Trialforce. But I based those profiles on the "Salesforce" User License and now find that although my Trialforce package has an LMA license limit of 5 users I get a "All of your user licenses are currently in use by active users" when I attempt to associate an additional user with one of my custom profiles. It seems like some other limit - presumably on the "Salesforce" User License - is kicking in.

 

I haven't found a good reference on these two User License types and would appreciate a link if anyone has one.

 

Should I have based my profiles on the "Salesforce Platform" User Licence.

 

Help appreciated,

Keith

The initial version of our package was updating the LMA (creating a license etc) when a Trialforce install was done but a newer version of the package is not updating the LMA. As far as I can see the newer version is correctly associated with our LMA org (AKA the LMO).

 

Any suggestions on what could be wrong?

 

Thanks,

Keith

I have been asked to turn a link off when a trial user is accessing our package. (We are using Trialforce and the LMA.) I see the method:

 

    UserInfo.isCurrentUserLicensed('namespace')

 

but am looking for confirmation that it returns false for "Trial" users and true when the trial is converted to "Active" via the LMA.

 

Thanks,

Keith

We want to change the labels used for Contact and Account in our packaged application to Person and Organization respectively because that is the appropriate terminology in our business domain. Our expectation is that our users will not be using other CRM oriented applications at the same time.

 

It is possible to use Setup -> Customize -> Tab Names and Labels -> Rename Tabs and Labels to make this change interactively. But so far I have not found any way to package this change or to get it copied into the Eclipse IDE so that it can also be committed to SVN.

 

Can this renaming be packaged? If so please provide a link to instructions on how to do it.

 

Thanks,

Keith

I have a group of custom settings that are set to visibility = "Protected" I have included these custom settings in a managed package.  I am deploying my managed package to an Enterprise edition instance of Salesforce and when I log in to that instance as the administrator, I am unable to see these custom settings.  From reading SF documentation, it appears the custom settings are hidden since they were protected in the managed package.

 

I am not able to change the custom settings to "Public" on my developer instance and I don't know how to access them in the deployed instance to set the values for each setting.  Is there a way to do this?

  • June 30, 2010
  • Like
  • 0

In preparation for the Force.com AppExchange Security Review (see e.g. Requirements Checklist) I have been trying to write unit tests for my application's CRUD security and FLS logic.

 

The two tests below demonstrate the problem that I have got stuck on. System.runAs can have an impact on the describe call result as isUpdateable is false in the first test class and true in the second. But the first obtained describe data remains cached both within a test method and across the whole test class.

 

I'm looking for suggestions on how to write CRUD security and FLS tests given this unexpected behavior.

 

Thanks, Keith

 

@isTest
private class DescribeFalseTest {

    @isTest
    static void testOne() {
    
        // Observed bizarre behavior: if first call is false rest will be false
        System.runAs(readOnlyUser()) {
            System.assertEquals(false, Account.SObjectType.getDescribe().isUpdateable());
        }

        System.assertEquals(false, Account.SObjectType.getDescribe().isUpdateable());
    }

    @isTest
    static void testTwo() {

        System.assertEquals(false, Account.SObjectType.getDescribe().isUpdateable());
        
        System.runAs(readOnlyUser()) {
            System.assertEquals(false, Account.SObjectType.getDescribe().isUpdateable());
        }
    }
    
    private static User readOnlyUser() {

        Profile p = [select Id, Name from Profile where Name = 'Read Only'];
        User u = new User(
            UserName = 'test-user@test-company.com',
            FirstName = 'Test-First-Name',
            LastName = 'Test-Last-Name',
            Alias = 'test',
            Email = 'test-user@test-company.com',
            EmailEncodingKey = 'UTF-8',
            LanguageLocaleKey = 'en_US',
            LocalesIdKey = 'en_US',
            TimezonesIdKey = 'America/Los_Angeles',
            ProfileId = p.Id
            );
        insert u;
        return u;
    }
}

 

@isTest
private class DescribeTrueTest {

    @isTest
    static void testOne() {
    
        // Observed bizarre behavior: if first call is true rest will be true
        System.assertEquals(true, Account.SObjectType.getDescribe().isUpdateable());
        
        System.runAs(readOnlyUser()) {
            System.assertEquals(true, Account.SObjectType.getDescribe().isUpdateable());
        }
    }

    @isTest
    static void testTwo() {

        System.runAs(readOnlyUser()) {
            System.assertEquals(true, Account.SObjectType.getDescribe().isUpdateable());
        }

        System.assertEquals(true, Account.SObjectType.getDescribe().isUpdateable());
    }
    
    private static User readOnlyUser() {

        Profile p = [select Id, Name from Profile where Name = 'Read Only'];
        User u = new User(
            UserName = 'test-user@test-company.com',
            FirstName = 'Test-First-Name',
            LastName = 'Test-Last-Name',
            Alias = 'test',
            Email = 'test-user@test-company.com',
            EmailEncodingKey = 'UTF-8',
            LanguageLocaleKey = 'en_US',
            LocalesIdKey = 'en_US',
            TimezonesIdKey = 'America/Los_Angeles',
            ProfileId = p.Id
            );
        insert u;
        return u;
    }
}

I am trying execute action when the page loads. I want to display the details of a record Id (for testing purposes i have hardcoded the Id).

 

public class MileageExtension {
private final Mileage__c mileageObj;
public MileageExtension(ApexPages.StandardController controller) {
this.mileageObj = (Mileage__c)controller.getRecord();
}
public Mileage__c[] getTodaysMileageRecords() {
String createdbyId = UserInfo.getUserId();
Mileage__c[] mileageList =
[SELECT name, miles__c
FROM Mileage__c
WHERE Date__c <= TODAY
AND createdbyid = :createdbyId];
return mileageList;
}

public PageReference InitMileageCustomview() {
PageReference secondPage = Page.MileageCustomview;
secondPage.setRedirect(true);
secondPage.getParameters().put('id','a008000000CqtDd');
return secondPage;

}

}

 And My Page is

 

 

 

<apex:page standardController="Mileage__c" extensions="MileageExtension" action="{!InitMileageCustomview}">
<h1>{!$User.FirstName}'s Mileage Page</h1>
<apex:pageBlock >
<apex:pageBlockSection title="Today’s Mileage Records">
<apex:dataTable value="{!TodaysMileageRecords}"
var="mileage" styleClass="list">
<apex:column >
<apex:facet name="header">Name</apex:facet>
<apex:outputText value="{!mileage.Name}"/>
</apex:column>
<apex:column >
<apex:facet name="header">Miles</apex:facet>
<apex:outputText value="{!mileage.Miles__c}"/>
</apex:column>
</apex:dataTable>
</apex:pageBlockSection>
</apex:pageBlock>
<apex:detail subject="{!Mileage__c.Contact__c}" relatedList="false"/>
</apex:page>

 

 

 

When I click the visualforce tab it keeps running and running (infinite loop....).  How can I get the detail record whenever the page gets loaded?

 

Thank you.

 

 

 

 

Hello Community !!

 

We have 2 custom object, in master-detail relationship.

 

When master record is deleted, the associated detail records are also deleted automatically.

 

And, we have a after-delete trigger on the detail object.

 

The problem is, that though the trigger works fine when we delete the detail records directly, it does not fire when the master is deleted, and thus the detail records are deleted.

 

Any pointers ?

 

 

 

  • May 08, 2009
  • Like
  • 0

I see what looks like a language bug in Apex (either that, or 'protected' has a surprising meaning in Apex).

 

According to the language reference: protected is defined as:

"This means that the method or variable is visible to any subclasses in the defining Apex class". Note that it says any *subclasses* *in* the defining apex class.

 

Here's what I see:

 

 

public class TestClass { public abstract class Base { protected abstract String protected_method(); public void protected_method_caller() { System.debug('Returning ' + protected_method()); } protected void is_this_really_protected() { System.assert(true, 'Not true'); System.debug('this is a test'); } } public class Derived extends Base { protected override String protected_method() { System.debug('Calling protected method'); System.assert(true, 'Not True'); return 'Test'; } } public class UnRelated { public void unrelated_method() { Derived d = new Derived(); d.is_this_really_protected();// THIS LINE SHOULD FAIL AS UNRELATED IS NOT A SUBCLASS

} } public testmethod static void test_protected_method() { Derived d = new Derived(); d.protected_method_caller(); } public testmethod static void test_unrelated_method() { UnRelated u = new UnRelated(); u.unrelated_method(); } }

 

In the above test case,  an unrelated inner class is able to call a protected method(as long as it is defined in the same outer class). (Ie. It is *in* the same defining class but not a *subclass*)

 

Now consider this:

 

// In base.cls public abstract class Base { protected abstract String protected_method(); public void protected_method_caller() { System.debug('Returning ' + protected_method()); // QUITE LEGITIMATE. SHOULD WORK! } } // In derived.cls public class Derived extends Base { protected override String protected_method() { System.debug('Calling protected method'); System.assert(true, 'Not True'); return 'Test'; } public static testmethod void testderived() { Derived d = new Derived(); d.protected_method_caller(); } }

 

What, to me, seems a fairly normal use of protected. Running this test fails with:

System.TypeException: Method is not visible: [Derived].protected_method()  

 

In this case, Base cannot see the overriden Derived protected_method(). NOTE: If I change the modifier in Derived to public override protected_method() {...}, it works. (Ie. it is a *subclass* but not *in* the same defining class.

 

Is this how it's supposed to behave? Or is this a bug?

 

thanks,

Vijay

 

  • April 11, 2009
  • Like
  • 0

When rendering a page as a PDF the filename of the PDF is the name of the page which is not a good thing. The problem with this is that the name is not unique and can cause confusion with the user.

 

I'm working on a quoting app that renders a quote as a PDF. Some broswers open the PDF embed, others automatically launch your PDF reader, and some prompt you to save or open. The problem is that if opened or saved theses files are all saved as qoute.pdf, qoute[1].pdf, quote[2].pdf, quote[3].pdf. The problem should be obvious.

 

Ideally you should be able to define the name of the generated PDF but I haven't figured out how to do this.

 

Thanks,

Jason

  • February 25, 2009
  • Like
  • 1
There has to be an easy solution for this but I can't find it...  If I don't specify an Approval Assignment Email template in one of my Approval processes, when new Approvers are assigned they get a not-so-pretty (but functional) email that tells them to click on a link to approve the item.  The email looks like below with a dynamically generated hyperlink:

Force.com Sandbox

Joe Schmo has requested your approval for the item below.

https://{!tokenizedDomain}/p/process/ProcessInstanceWorkitemWizardStageManager?id={!someRowID}

Please click this link to approve or reject this record.

I have a visualforce email that I want to target to certain users based on characteristics of the item being approved.  I'd really like to use the default sending of this email based on the approvers that are conditionally assigned as that logic is in place in approval process steps.  I can't figure out how to get the track-back link to appear on my visualforce page (which is 'Related To' a Custom Object).  Can someone give me an idea?  The salesforce training/documentation is a little unclear

"If the email template you choose contains approval merge fields named {!ApprovalRequest.field_name}, these fields will return values only when that email template is used as the approval assignment template. If you use the template for any other email alert action—in either workflow rules or approval processes—the merge fields will return a null value."
  • January 20, 2009
  • Like
  • 0
Hello Everyone,

I am very new to Salesforce.com, I need to read and write a CSV file using Apex code.

Functionality wants to implement : Read some records using query and write into a excel file and
read a CSV file and insert records into database.
this should be using apex code.

Please help me :)

Thanks