• tango
  • NEWBIE
  • 0 Points
  • Member since 2006

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 18
    Questions
  • 11
    Replies

I seem to have the syntax off a bit here. I just want a function to redirect (as a short cut) to a target template folder.

Is there an easier way to just redirect the page from a VF page?

Code:
<script language="JavaScript">
function market_templates() {
window.parent.location.href="/00X?setupid=EmailTemplates&fcf=00l4000000101yK";
}
</script>


<apex:commandButton action="" value="Review Templates" title="Link to Email Templates" onclick="market_templates();"  / >


 


  • October 13, 2008
  • Like
  • 0
Is there an easy method to use the standard related object list view in a pageblock or iframe below an existing pageblock?

I am referring to the standard url function   /{objectprefix}rlid={!look up ref id}&id={object id}

Trying to leverage the existing related list function for a single related list object for lists +50. I can create a link to the list but would like to include it in inside the VF page.

thanks

  • October 12, 2008
  • Like
  • 0
I have an apex class that is set up mass update contact records. It spools through and updates some custom indexes that we use.

Currently it uses a a for loop to spool through and update contact 1k at a time. I am getting a governor warning :

Number of query rows: 9300 out of 10000
Number of DML rows: 9291 out of 10000

Is there a work around to updating more then 10k records via a class? I have it attached to a campaign button to update contacts from a current campaign and it is likely that we will have more then 10k.

  • October 12, 2008
  • Like
  • 0

Somehow I cant get the syntax to NOT log all success records. I think I have tried every possibility.. caps, no caps, omit line... etc..

Loging a few hundred thousand lines not only takes up a lot of space it slows down the process.


Code:
 <!-- 2008 Load  -->
 <bean id="Get2008"
          class="com.salesforce.lexiloader.process.ProcessRunner"
          singleton="true">
      <description></description>
        <property name="name" value="Get2008"/>
        <property name="configOverrideMap">
            <map>
                <entry key="sfdc.debugMessages" value="false"/>
                <entry key="sfdc.debugMessagesFile" value="status\SoapTrace.log"/>
                <entry key="sfdc.endpoint" value="https://www.salesforce.com"/>
                <entry key="sfdc.username" value="xxxxxxxxxxxxxxxxxxx"/>
                <entry key="sfdc.password" value="xxxxxxxxxxxxxxxxxxxxxx"/>
    <entry key="sfdc.entity" value="XXData__c"/>
                <entry key="process.operation" value="upsert"/>
    <entry key="sfdc.externalIdField" value="XXXX_Id__c"/> 
    <entry key="process.outputError" value="status\errors.csv" />
    <entry key="process.enableExtractErrorOutput" value="true" /> 
    <entry key="process.enableExtractSuccessOutput" value="FALSE" /> 
          <entry key="process.mappingFile" value="Conf\DataMap.sdl"/>
                <entry key="dataAccess.type" value="databaseRead"/>
                <entry key="dataAccess.name" value="RPT_2008"/>
            </map>
        </property>
    </bean>

 


  • October 09, 2008
  • Like
  • 0
I have a VF page to display the campaign members and i used an apex class to return a campaign Memeber List into a pageblocktable.

Everything works ok but i am having difficutly with creating the test coverage.
Code:
public class CampMember {
public final Campaign camp;
public CampMember(ApexPages.StandardController controller) {
     this.camp = (Campaign)Controller.getRecord();  
    }
public List<CampaignMember> getMemberList(){
    List<CampaignMember> MemberList;
    if(MemberList == null) MemberList = 
    [select ID,CampaignId,Contact.email, ContactId,Status,FirstRespondedDate,Contact.AccountId,Contact.VAR_Reseller_ID__c from CampaignMember where CampaignId = :camp.id ];
    return MemberList;
    }
public Integer getNumberReg(){
    Integer NumberReg = 0 ;
    for(CampaignMember Reglist : [select ID,CampaignId,Contact.email, ContactId, Status from CampaignMember where CampaignId = :camp.id AND status = 'Registered' ])
        { NumberReg++;     
          }
   return NumberReg;
  }
}

this gives an error with the class constructor..
 
Code:
static testMethod void testCampMemberpage() {

PageReference pageRef = Page.CampMember;
Test.setCurrentPageReference(pageRef);
CampMember PageCon = new CampMember();

PageCon.getMemberList();
    }

 Also curious if I can calculate the reg while generating the list view to be more efficient with the code.







  • October 08, 2008
  • Like
  • 0
Anyone notice that the mass email from sandbox sends attachment links to production urls? Is this a known issue?

Adjusting the url to the test@ and the link works ok



  • September 30, 2008
  • Like
  • 0

I need on occasion to mass delete all records from an object. I am using the data loader for the process but its still a hour long process or more. is there a way to mass delete all records ?




Message Edited by tango on 09-28-2008 11:11 AM
  • September 28, 2008
  • Like
  • 0
I am trying to create a page to view campaign members.

I have the basic list view done but need to extend the data to include items such as Account name from the Contact. How can I extend the List that I am using to include other related elements?

Code:
 <apex:pageBlock tabstyle="Campaign" title="Campaign Members" >
<apex:pageBlocktable value="{!MemberList}" var="CMList" rendered="{!NOT(ISNULL(MemberList))}">
<apex:column value="{!CMList.Id}"/>
<apex:column value="{!CMList.ContactId}"/>
<apex:column value="{!CMList.Status}"/>
<apex:column value="{!CMList.FirstRespondedDate}"/>

</apex:pageBlocktable>

...

List<CampaignMember> MemberList; public List<CampaignMember> getMemberList(){ if(MemberList == null) MemberList = [select ID,ContactId,Status,FirstRespondedDate from CampaignMember where CampaignId = :ApexPages.currentPage().getParameters().get('id') ]; return MemberList; }
...

 

  • September 26, 2008
  • Like
  • 0
Since there basic merge function is an update and delete to 2 accounts, is there a way to hook to a merge request funcgtion  with a trigger ?

What I need to do is stop a merge if there is one type of related records asscociated with one of the 2 accounts. I know I can catpure the merge data from the deleted record with a delete trigger but how can i stop the merge all together if a condition is not met?

Thanks


  • September 23, 2008
  • Like
  • 0
the excel connector creates a duplicate column for one of the fields in my product2 table. It has the same API name and create a query error.

I cant find any duplicate in the data model and when i remove the column every thing works fine.

Anyone seen this error before? Wanted to make sure I did not miss something in the object that needs to be corrected.


  • September 22, 2008
  • Like
  • 0
I was having difficulty with migrating email templates and finally figured out that it was not seeing any templates in folders.

I can move templates from the 'unfilled' 'folder just fine now.

I tried using the 'folder' type and many other variations for 'emailtemplate' with no sucess. There are no examples I can find for the syntax to migrate email templates and folders. Does anyone have a sample here?

Thanks

  • September 18, 2008
  • Like
  • 0

Is there a way to hook action to the campaign member table? I need to drive activity based on the Campaign member status updates. Can this be done via the parent object (campaign or Contact ?) I cant see a way to create a trigger or workflow on the campaign member.

Thanks

  • September 10, 2008
  • Like
  • 0
I was able to get a proof of concept trigger working for single record inserts but I had difficulty with the bulk insert effort.

Trying to insert a custom object record and build a relationship to the Product2 Object based on a common custom field called SKU.

Any advice would be greatly apprecaited.


Code:
trigger GetProduct2 on Custom_Data__c (before insert) {


Map<String, Product2> pm = new Map<String,Product2> ([select Product_SKU__c, Id from Product2 where Product_SKU__c = :trigger.new[0].Product_SKU__c]); 

for (Custom_Data__c P : Trigger.new){
        if(pm.get(P.Product_SKU__c)!= null ) {
            P.Related_Product__c = pm.get(P.Product_SKU__c).id;
            }
    }
}

 

  • September 04, 2008
  • Like
  • 0
I was trying to use a WIL to allow users to create a related object to a CASE.

Is there a way to change or use a retURL that can close the pop up window?

Can you use an sControl to execute the url and then close the window?

Code:
https://na1.salesforce.com/a0G/e—retURL=%2F{!Case_ID}&CF00N30000001RkL3_lkid={!Case_ID}&CF00N30000001RkL3={!Case_CaseNumber}&RecordType=012300000009BHe&rt=01I30000000DlrN&cancelURL=%2F{!Case_ID}

Thanks

  • November 21, 2006
  • Like
  • 0
It would be nice to be able to determine behavior for a routing address regarding when no Case (Thread) is found for an inbound email. We would like the ability in the gateway to 'NOT' create a new case if the case id/thread was not found but rather bounce the email back to the user. Obviously this would not be an email bounce but a response from the email2Case gateway indicating the error finding the case.

Does anyone know if this can be done or is being worked on for a future release?

Thanks

Message Edited by tango on 11-09-2006 05:33 PM

  • November 10, 2006
  • Like
  • 0
   
We are working on a project and I was trying to find a reference regarding accessing reports via the API. You would think since the Office edition provides just this functionality the support should be there but I have not been able to find any documentation.  Does anyone know if this is possible?

Thanks

Ok sorry.. found this post..
http://community.salesforce.com/sforce/board/message?board.id=NET_development&message.id=2198&query.id=40799#M2198

There was talk of support this in the future. Does anyone know if this made it to the Winter 07 release?

Message Edited by tango on 11-06-2006 07:25 PM

Message Edited by tango on 11-06-2006 07:26 PM

  • November 07, 2006
  • Like
  • 0

We have a custom object that when selecting the object from the lookup function (after relating to another object) we would like to use an external ID field for the search instead of the custom object Name/Number. Is it possible to change the default search behavior or replace this with an sControl?

Alternatively we would like to perhaps filter or limit the search items available based on the value of the external id field. In other words input the second field/External ID and only show the available Custom objects with the corresponding external values.

Any suggestions would be great. T


Thanks




  • October 30, 2006
  • Like
  • 0
I was trying to use the Excel Connector and the Data loader and neither seem to be able to reference the Record Type field for a Custom Object. Is this not available or is there a work around?
 
Thanks
 

Message Edited by tango on 10-04-2006 05:09 PM

Message Edited by tango on 10-04-2006 05:09 PM

  • October 05, 2006
  • Like
  • 0
Is there an easy method to use the standard related object list view in a pageblock or iframe below an existing pageblock?

I am referring to the standard url function   /{objectprefix}rlid={!look up ref id}&id={object id}

Trying to leverage the existing related list function for a single related list object for lists +50. I can create a link to the list but would like to include it in inside the VF page.

thanks

  • October 12, 2008
  • Like
  • 0
I have an apex class that is set up mass update contact records. It spools through and updates some custom indexes that we use.

Currently it uses a a for loop to spool through and update contact 1k at a time. I am getting a governor warning :

Number of query rows: 9300 out of 10000
Number of DML rows: 9291 out of 10000

Is there a work around to updating more then 10k records via a class? I have it attached to a campaign button to update contacts from a current campaign and it is likely that we will have more then 10k.

  • October 12, 2008
  • Like
  • 0

Somehow I cant get the syntax to NOT log all success records. I think I have tried every possibility.. caps, no caps, omit line... etc..

Loging a few hundred thousand lines not only takes up a lot of space it slows down the process.


Code:
 <!-- 2008 Load  -->
 <bean id="Get2008"
          class="com.salesforce.lexiloader.process.ProcessRunner"
          singleton="true">
      <description></description>
        <property name="name" value="Get2008"/>
        <property name="configOverrideMap">
            <map>
                <entry key="sfdc.debugMessages" value="false"/>
                <entry key="sfdc.debugMessagesFile" value="status\SoapTrace.log"/>
                <entry key="sfdc.endpoint" value="https://www.salesforce.com"/>
                <entry key="sfdc.username" value="xxxxxxxxxxxxxxxxxxx"/>
                <entry key="sfdc.password" value="xxxxxxxxxxxxxxxxxxxxxx"/>
    <entry key="sfdc.entity" value="XXData__c"/>
                <entry key="process.operation" value="upsert"/>
    <entry key="sfdc.externalIdField" value="XXXX_Id__c"/> 
    <entry key="process.outputError" value="status\errors.csv" />
    <entry key="process.enableExtractErrorOutput" value="true" /> 
    <entry key="process.enableExtractSuccessOutput" value="FALSE" /> 
          <entry key="process.mappingFile" value="Conf\DataMap.sdl"/>
                <entry key="dataAccess.type" value="databaseRead"/>
                <entry key="dataAccess.name" value="RPT_2008"/>
            </map>
        </property>
    </bean>

 


  • October 09, 2008
  • Like
  • 0
I have a VF page to display the campaign members and i used an apex class to return a campaign Memeber List into a pageblocktable.

Everything works ok but i am having difficutly with creating the test coverage.
Code:
public class CampMember {
public final Campaign camp;
public CampMember(ApexPages.StandardController controller) {
     this.camp = (Campaign)Controller.getRecord();  
    }
public List<CampaignMember> getMemberList(){
    List<CampaignMember> MemberList;
    if(MemberList == null) MemberList = 
    [select ID,CampaignId,Contact.email, ContactId,Status,FirstRespondedDate,Contact.AccountId,Contact.VAR_Reseller_ID__c from CampaignMember where CampaignId = :camp.id ];
    return MemberList;
    }
public Integer getNumberReg(){
    Integer NumberReg = 0 ;
    for(CampaignMember Reglist : [select ID,CampaignId,Contact.email, ContactId, Status from CampaignMember where CampaignId = :camp.id AND status = 'Registered' ])
        { NumberReg++;     
          }
   return NumberReg;
  }
}

this gives an error with the class constructor..
 
Code:
static testMethod void testCampMemberpage() {

PageReference pageRef = Page.CampMember;
Test.setCurrentPageReference(pageRef);
CampMember PageCon = new CampMember();

PageCon.getMemberList();
    }

 Also curious if I can calculate the reg while generating the list view to be more efficient with the code.







  • October 08, 2008
  • Like
  • 0
I am trying to create a page to view campaign members.

I have the basic list view done but need to extend the data to include items such as Account name from the Contact. How can I extend the List that I am using to include other related elements?

Code:
 <apex:pageBlock tabstyle="Campaign" title="Campaign Members" >
<apex:pageBlocktable value="{!MemberList}" var="CMList" rendered="{!NOT(ISNULL(MemberList))}">
<apex:column value="{!CMList.Id}"/>
<apex:column value="{!CMList.ContactId}"/>
<apex:column value="{!CMList.Status}"/>
<apex:column value="{!CMList.FirstRespondedDate}"/>

</apex:pageBlocktable>

...

List<CampaignMember> MemberList; public List<CampaignMember> getMemberList(){ if(MemberList == null) MemberList = [select ID,ContactId,Status,FirstRespondedDate from CampaignMember where CampaignId = :ApexPages.currentPage().getParameters().get('id') ]; return MemberList; }
...

 

  • September 26, 2008
  • Like
  • 0
I was able to get a proof of concept trigger working for single record inserts but I had difficulty with the bulk insert effort.

Trying to insert a custom object record and build a relationship to the Product2 Object based on a common custom field called SKU.

Any advice would be greatly apprecaited.


Code:
trigger GetProduct2 on Custom_Data__c (before insert) {


Map<String, Product2> pm = new Map<String,Product2> ([select Product_SKU__c, Id from Product2 where Product_SKU__c = :trigger.new[0].Product_SKU__c]); 

for (Custom_Data__c P : Trigger.new){
        if(pm.get(P.Product_SKU__c)!= null ) {
            P.Related_Product__c = pm.get(P.Product_SKU__c).id;
            }
    }
}

 

  • September 04, 2008
  • Like
  • 0
Hello.  I have configured the DataLoader to run from a command prompt a number of times - for automation purposes.  Whenever I execute it, various logging is sent to the command window - then it reaches "Setting object reference types" - and it pauses for several minutes. 

At some point it continues and all is well.  What is the cause of this delay?  How do I avoid it?

Thanks
chris
  • May 22, 2008
  • Like
  • 0
I was trying to use the Excel Connector and the Data loader and neither seem to be able to reference the Record Type field for a Custom Object. Is this not available or is there a work around?
 
Thanks
 

Message Edited by tango on 10-04-2006 05:09 PM

Message Edited by tango on 10-04-2006 05:09 PM

  • October 05, 2006
  • Like
  • 0