• TracMikeL
  • NEWBIE
  • 30 Points
  • Member since 2010
  • Traction on Demand Inc.

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 11
    Questions
  • 21
    Replies
Has anyone installed Identity Connect that can help me out?

I got the sync from AD to SF working great but SSO is where I am having problems.

When I try and login via the Identity Connect URL it accepts my credentials and says login sucessful then quickly changes to "Internal Server Error".

Not sure where to begin to troubleshoot as the docs are pretty weak and error mesages are quite lacking.

Hey Guys,

 

I have configured sites to use our Customer Portal.

 

We want to use the custom siteLogin VF page. is it possible to use that login page only and have ti send the users to our standard customer portal after login? Or are the sessions not compatible?

How would you go about doing real time integration with a 3rd party application from Salesforce?

 

If you make Remote Calls via a trigger when a change occurs you have to use @future which has strict governor limits.

 

It's not possible to override the save button as far as I can see so there goes that...

 

How do people do this? is it even possible?

 

 

Is there a way to include a record from a Custom Setting in a Package?

Hey Guys,

 

I have the following VF code. I want to render the inputfield when the selectlist selectoptions is empty. And if its not empty show the selectlist only.

 

is this possible?

 

 

            <apex:pageBlockSection collapsible="false" columns="2" id="MappingValues">
                <apex:inputField id="TargetValue" value="{!Mapping.Value_Out__c}" required="true" />
                <apex:selectList id="TargetPickList" value="{!Mapping.Value_Out__c}" size="1">
                    <apex:selectOptions value="{!TargetPickList}"/>
                </apex:selectList>
            </apex:pageBlockSection>                     

 

 

 

We are getting the following error when viewing a custom VF page. We have NO validation on the page or the object.
There were custom validation error(s) encountered while saving the affected record(s). The first validation error encountered was "Subject: data value too large: Call Logged with Overlin Zamora RE: Pittsburg High School Reconstruction/Modernization (max length=80)". 
Here is my Apex code for that page 
SObject[] ClosedTasks = [SELECT (SELECT Id, WhatId, WhoId, LastModifiedDate, Subject, Who.Name, ActivityDate, Status, Priority, Owner.Name, Description, IsTask 
FROM ActivityHistories ORDER BY ActivityDate DESC, LastModifiedDate DESC LIMIT 500) 
FROM Opportunity WHERE Id = :o.Id];

myClosedTasks = (List<ActivityHistory>)ClosedTasks.get(0).getSObjects('ActivityHistories');

 

And here is the VF page.

 

 

<apex:page standardController="Opportunity" extensions="trac_Activity_History">

	<apex:form >
	<apex:pageBlock >
	<apex:pageBlockSection collapsible="false" title="Activity History" columns="1">
	
		<apex:pageBlockTable value="{!myClosedTasks}" var="t">
		
                    <apex:column headerValue="Action" width="75px" rendered="{!if(t.IsTask,'true','false')}">                    
                       <a href="{!URLFOR($Action.Task.Edit, t.Id,[retURL=URLFOR('/apex/ActivityHistory?Id='+ t.WhatId)])}" target="_top">Edit</a>
                    </apex:column>
                    <apex:column headerValue="Action" width="75px" rendered="{!if(t.IsTask,'false','true')}">                    
                       <a href="{!URLFOR($Action.Event.Edit, t.Id,[retURL=URLFOR('/apex/ActivityHistory?Id='+ t.WhatId)])}" target="_top">Edit</a>
                    </apex:column>
                    <apex:column value="{!t.IsTask}"/>
                    <apex:column headerValue="Name">
                        <apex:outputLink target="_top" value="/{!t.WhoId}">{!t.Who.Name}</apex:outputLink>
                    </apex:column>
                    <apex:column value="{!t.ActivityDate}"/>
                    <apex:column headervalue="Assigned To">
                        <apex:outputLink target="_top" value="/{!t.OwnerId}">{!t.Owner.Name}</apex:outputLink>
                    </apex:column>
                    <apex:column value="{!t.Status}"/>
                    <apex:column headerValue="Subject" value="{!t.Subject}" />
                    <apex:column headerValue="Comments">
                    	<apex:outputText >{!t.Description}</apex:outputText>
                    </apex:column>                    
		
		</apex:pageBlockTable>
	
	</apex:pageBlockSection>
	</apex:pageBlock>
	</apex:form>
	
</apex:page>

 

Why would this error occur? Seems odd.

 

 

 

Hey Guys, Whats the syntax for executing the below managed global method via the System Log?

 

Name: trac_All_Sales_Budget

Namespace Prefix: tracSB

 

global class trac_All_Sales_Budget

static void CreateBudgets()

 

Ive tried tracSB__trac_All_Sales_Budgets.CreateBudgets();

 

Does not work. Any ideas?


Hey Guys, I have 3 elements in a Header Facet. I want to not render one when a variable = false. Here is the code I have.

 

 

                    <apex:facet name="header">
                        <a href="/00T/e?tsk10=Call&what_id={!oId}&retURL=/{!oId}&followup=1" target="_top" class="btn" style="text-decoration: none;">Log A Call</a>
                        <a href="/_ui/core/email/author/EmailAuthor?p2_lkid={!aId}&rtype=003&p3_lkid={!oId}&retURL=/{!oId}" target="_top" class="btn" style="text-decoration: none;">Send An Email</a>
                        <a href="/007?id={!oId}&rlid=RelatedHistoryList&closed=1" target="_top" class="btn" style="text-decoration: none;">Go To List - Show All</a>
                    </apex:facet>

 

I want to be able to hide the 3rd link. I tried using a outputlink but if I set the rendered to false all elements in the facet disappear.

 

This is what I tried.

 

 

                    <apex:facet name="header">
                        <a href="/00T/e?tsk10=Call&what_id={!oId}&retURL=/{!oId}&followup=1" target="_top" class="btn" style="text-decoration: none;">Log A Call</a>
                        <a href="/_ui/core/email/author/EmailAuthor?p2_lkid={!aId}&rtype=003&p3_lkid={!oId}&retURL=/{!oId}" target="_top" class="btn" style="text-decoration: none;">Send An Email</a>
                        <apex:outputLink value="/007?id={!oId}&rlid=RelatedHistoryList&closed=1" id="theLink" rendered="{!bClosedLarge}">Go To List - Show All</apex:outputLink>
                    </apex:facet>

 

 

 

Thanks

Mike

 

Hey Guys,

 

In the below trigger I am updating records on Contact Record from values on the Account. How can I bulkify this? It hits the Script limitations otherwise.

 

 

trigger trac_PrimaryContact on Account (after insert, after update) {
	
	List<String> updPContacts = new List<String>();
	
	for (Account a :Trigger.new) {	
		

		if(a.Contact__c != null) {
						
			updPContacts.Add(a.Affnet_Contact__c);
		}
	}
	
	
	//Update Contacts
	if(updPContacts.Size() > 0) {
				
		Contact[] myCons = [SELECT Id, FirstName, LastName, Email, Title FROM Contact WHERE ID IN :updPContacts];
										
		for(Contact myC :myCons) {
			
			for (Account a :Trigger.new) {	
								
				if(myC.Id == a.Contact__c) {
					
					myC.FirstName = a.First_Name__c;
					myC.LastName = a.Last_Name__c;
					myC.Email__c = a.Email__c;
					myC.Title = a.Title__c;
				}
			}
		}
		
		update myCons;			
	}	
}

 

 

I have a simple custom object with Contact and Account lookup.

 

When the contact is populated and the account is not, what is the most efficient trigger code to populate the account lookup from the contact?

 

Thanks!

Hey Guys,

 

I am using this code

 

 

List<List<SObject>> searchList = [find :searchStr in all 
	 		fields returning product2 (id, name, family, productcode, Size__c, Loanable__c)];
	 	products = ((list<product2>)searchList[0]);

 

Should it not search against all the fields I specify? It does not seem to be searching on the Family field.

 

Has anyone installed Identity Connect that can help me out?

I got the sync from AD to SF working great but SSO is where I am having problems.

When I try and login via the Identity Connect URL it accepts my credentials and says login sucessful then quickly changes to "Internal Server Error".

Not sure where to begin to troubleshoot as the docs are pretty weak and error mesages are quite lacking.

Hello everyone,

 

We are trying to use the new API Salesforce made available during Winter '13: Test.setMock.

We followed the documentation, but encountered the following issue that we were unable to resolve: a System.CalloutException, complaining that we had "uncommitted work pending".

 

Of course we do, our testmethod starts by setting up some Test Data that's necessary for the test to work, and that includes inserting and updating data.

In an actual execution, there would be no data creation, as the data would already be present. Actually doing the callout doesn't raise the Uncomitted work pending exception, so the Test Data really is at fault.

 

We did use Test.startTest() and Test.stopTest() to differentiate Test Data creation from Test Execution but this (as expected) didn't work.

We also tried some hacks, including the System.runAs(new User( Id = UserInfo.getUserId()){} that had, in the past, allowed us to circumvent "Mixed DML operations". This didn't work either.

 

We considered using the Test.loadData method, but we're inserting related objects and couldn't figure out a clean enough way to make it work (maybe we should try using ExternalID's?).

 

 

For the moment, our workaround is to modify the class generated from the WSDL, adding a if (Test.isRunningTest()) {} else {}, but that means we have to modify the autogenerated code, which is suboptimal.

 

 

Did anyone try to use this new API and run into the same issue? How did you solve it?

How would you go about doing real time integration with a 3rd party application from Salesforce?

 

If you make Remote Calls via a trigger when a change occurs you have to use @future which has strict governor limits.

 

It's not possible to override the save button as far as I can see so there goes that...

 

How do people do this? is it even possible?

 

 

Hey Guys,

 

I have the following VF code. I want to render the inputfield when the selectlist selectoptions is empty. And if its not empty show the selectlist only.

 

is this possible?

 

 

            <apex:pageBlockSection collapsible="false" columns="2" id="MappingValues">
                <apex:inputField id="TargetValue" value="{!Mapping.Value_Out__c}" required="true" />
                <apex:selectList id="TargetPickList" value="{!Mapping.Value_Out__c}" size="1">
                    <apex:selectOptions value="{!TargetPickList}"/>
                </apex:selectList>
            </apex:pageBlockSection>                     

 

 

 

We are getting the following error when viewing a custom VF page. We have NO validation on the page or the object.
There were custom validation error(s) encountered while saving the affected record(s). The first validation error encountered was "Subject: data value too large: Call Logged with Overlin Zamora RE: Pittsburg High School Reconstruction/Modernization (max length=80)". 
Here is my Apex code for that page 
SObject[] ClosedTasks = [SELECT (SELECT Id, WhatId, WhoId, LastModifiedDate, Subject, Who.Name, ActivityDate, Status, Priority, Owner.Name, Description, IsTask 
FROM ActivityHistories ORDER BY ActivityDate DESC, LastModifiedDate DESC LIMIT 500) 
FROM Opportunity WHERE Id = :o.Id];

myClosedTasks = (List<ActivityHistory>)ClosedTasks.get(0).getSObjects('ActivityHistories');

 

And here is the VF page.

 

 

<apex:page standardController="Opportunity" extensions="trac_Activity_History">

	<apex:form >
	<apex:pageBlock >
	<apex:pageBlockSection collapsible="false" title="Activity History" columns="1">
	
		<apex:pageBlockTable value="{!myClosedTasks}" var="t">
		
                    <apex:column headerValue="Action" width="75px" rendered="{!if(t.IsTask,'true','false')}">                    
                       <a href="{!URLFOR($Action.Task.Edit, t.Id,[retURL=URLFOR('/apex/ActivityHistory?Id='+ t.WhatId)])}" target="_top">Edit</a>
                    </apex:column>
                    <apex:column headerValue="Action" width="75px" rendered="{!if(t.IsTask,'false','true')}">                    
                       <a href="{!URLFOR($Action.Event.Edit, t.Id,[retURL=URLFOR('/apex/ActivityHistory?Id='+ t.WhatId)])}" target="_top">Edit</a>
                    </apex:column>
                    <apex:column value="{!t.IsTask}"/>
                    <apex:column headerValue="Name">
                        <apex:outputLink target="_top" value="/{!t.WhoId}">{!t.Who.Name}</apex:outputLink>
                    </apex:column>
                    <apex:column value="{!t.ActivityDate}"/>
                    <apex:column headervalue="Assigned To">
                        <apex:outputLink target="_top" value="/{!t.OwnerId}">{!t.Owner.Name}</apex:outputLink>
                    </apex:column>
                    <apex:column value="{!t.Status}"/>
                    <apex:column headerValue="Subject" value="{!t.Subject}" />
                    <apex:column headerValue="Comments">
                    	<apex:outputText >{!t.Description}</apex:outputText>
                    </apex:column>                    
		
		</apex:pageBlockTable>
	
	</apex:pageBlockSection>
	</apex:pageBlock>
	</apex:form>
	
</apex:page>

 

Why would this error occur? Seems odd.

 

 

 

Hey Guys, I have 3 elements in a Header Facet. I want to not render one when a variable = false. Here is the code I have.

 

 

                    <apex:facet name="header">
                        <a href="/00T/e?tsk10=Call&what_id={!oId}&retURL=/{!oId}&followup=1" target="_top" class="btn" style="text-decoration: none;">Log A Call</a>
                        <a href="/_ui/core/email/author/EmailAuthor?p2_lkid={!aId}&rtype=003&p3_lkid={!oId}&retURL=/{!oId}" target="_top" class="btn" style="text-decoration: none;">Send An Email</a>
                        <a href="/007?id={!oId}&rlid=RelatedHistoryList&closed=1" target="_top" class="btn" style="text-decoration: none;">Go To List - Show All</a>
                    </apex:facet>

 

I want to be able to hide the 3rd link. I tried using a outputlink but if I set the rendered to false all elements in the facet disappear.

 

This is what I tried.

 

 

                    <apex:facet name="header">
                        <a href="/00T/e?tsk10=Call&what_id={!oId}&retURL=/{!oId}&followup=1" target="_top" class="btn" style="text-decoration: none;">Log A Call</a>
                        <a href="/_ui/core/email/author/EmailAuthor?p2_lkid={!aId}&rtype=003&p3_lkid={!oId}&retURL=/{!oId}" target="_top" class="btn" style="text-decoration: none;">Send An Email</a>
                        <apex:outputLink value="/007?id={!oId}&rlid=RelatedHistoryList&closed=1" id="theLink" rendered="{!bClosedLarge}">Go To List - Show All</apex:outputLink>
                    </apex:facet>

 

 

 

Thanks

Mike

 

Hey Guys,

 

In the below trigger I am updating records on Contact Record from values on the Account. How can I bulkify this? It hits the Script limitations otherwise.

 

 

trigger trac_PrimaryContact on Account (after insert, after update) {
	
	List<String> updPContacts = new List<String>();
	
	for (Account a :Trigger.new) {	
		

		if(a.Contact__c != null) {
						
			updPContacts.Add(a.Affnet_Contact__c);
		}
	}
	
	
	//Update Contacts
	if(updPContacts.Size() > 0) {
				
		Contact[] myCons = [SELECT Id, FirstName, LastName, Email, Title FROM Contact WHERE ID IN :updPContacts];
										
		for(Contact myC :myCons) {
			
			for (Account a :Trigger.new) {	
								
				if(myC.Id == a.Contact__c) {
					
					myC.FirstName = a.First_Name__c;
					myC.LastName = a.Last_Name__c;
					myC.Email__c = a.Email__c;
					myC.Title = a.Title__c;
				}
			}
		}
		
		update myCons;			
	}	
}

 

 

I have a simple custom object with Contact and Account lookup.

 

When the contact is populated and the account is not, what is the most efficient trigger code to populate the account lookup from the contact?

 

Thanks!

A new version of "Dupe Eliminator" v1.1, is now available on the AppExchange. This app is free! 

It can help you clean up all your duplicate records on standard and custom objects, allows you to specify search criteria by field, and gives you the ability to merge dupe records found. 

You can download the app and user guide here:http://sites.force.com/appexchange/listingDetail?listingId=a0N3000000178g7EAA
  • April 28, 2009
  • Like
  • 0