• Andy Freeston_Larter
  • NEWBIE
  • 115 Points
  • Member since 2009
  • CTO
  • SalesMethods

  • Chatter
    Feed
  • 4
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 21
    Questions
  • 34
    Replies

Hello Guys,

                      I need to create hierarchical table like below. from single Custom Object.Visula force page contains Four lookup fields input fields.

 

   

Warehouse             Product               Serials                Button

                        

                                Product 1             0000-1

Warehouse 1                                      0000-2      

                                Product2              0000-3  

                                                               0000-4

 

     Thaank You,

     Raghu 

I have a managed package with a number of Visualforce pages.  These pages are intended as a default pages.  Experience tells us that customers who install this managed package are going to want their own version of these pages - they will want to change logos and layouts.  I have not been able to find any suggestions as to how this can be done.  I suspect I may have to change my packaging strategy but I don't know.

 

Does anyone have suggestions about how this can be accomplished.

 

Thanks,

 

Diane 

  • January 23, 2010
  • Like
  • 0
I am trying to do a SOQL case insensitive text search on fields that have been encrypted with a “Deterministic – Case Insensitive” key. It seems that the query will only match case sensitive.

I have a Contact with the FirstName as “Andy”. Matching “Andy” results in a match but “andy” or “ANDY” results in no match.
SELECT Id, Name FROM Contact WHERE FirstName='Andy' => Found
SELECT Id, Name FROM Contact WHERE FirstName='andy' => Not found
SELECT Id, Name FROM Contact WHERE FirstName='ANDY' => Not found

Is this Salesforce Platform Encryption working as intended?
Is it possible to make the SOQL query case insensitive?

Thanks.
- Andy
Hi, My application needs to be able to export an image to disk and I am currently using createObjectURL to convert a Blob to an image file that can then be saved.

When I try this in LWC I get an ‘Unexpected identifier’ error in the LockerService proxy.

Is converting Blob to file with createObjectURL something that the proxy will ever support?

Thanks.
Hi,
 
I have a Custom Link to a Custom Object Tab that has stopped working. I either get “URL No Longer Exists” or “Formula evaluation error in Custom Link” depending on where I open the link from.
 
The link formula used to be:
{!URLFOR($Action.NameSpace__ObjectName__c.Tab, null)}
 
I also tried:
{!URLFOR($Action.NameSpace__ObjectName __c.Tab, $ObjectType.NameSpace__ObjectName __c)}
 
Does anyone know if this is a bug in Salesforce and if there is a work around?

Many thanks.
Hi,

I plan on using the new custom metadata types to define settings for configuring my application. Since my application is complex and requires lots of settings I would like to cache the settings on the client and invalidate the cache if the settings have changed. To detect changes to the metadata I would like to get the last modified date/time for each record.

Is it possible to retrieve the date/time from a metadata record? It doesn't seem to contain a LastModifiedDate field like regular objects.

Thanks.

- Andy
Hi,
 
I am trying to read a Salesforce Report using the Apex API. I cannot find a way to decode the fact map when I have two groupings in the report.
 
My report returns a list of contacts and contains two groups, Country and Salutation. The API function “getGroupingsDown” returns a single list of values that correspond to the Country values. There doesn’t appear to be a function to return the second grouping values, or a list of GroupingValues for each group.
Reports.ReportResults results = Reports.ReportManager.runReport(reportId, true);
 
for ( Reports.GroupingValue groupingVal : results.getGroupingsDown().getGroupings() )
    System.debug('GroupingsDown Key:' + groupingVal.getKey() + ' Label:' + groupingVal.getLabel() + ' Value:' + groupingVal.getValue() );
This returns:
 
GroupingsDown Key:0 Label:- Value:null
GroupingsDown Key:1 Label:France Value:France
GroupingsDown Key:2 Label:US Value:US
GroupingsDown Key:3 Label:USA Value:USA
 
Is there another function I should be calling or another method to return the Salutation values for the second group?
 
Many thanks.
Andy
 
Hi,
 
My managed package needs to consume images that are stored as documents and static resources by our customers. This results in the URLs being for another domain than my application is served on so I am running into the following CORS issue:

Redirect at origin 'https://c.eu3.content.force.com' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://mypackage.eu3.visual.force.com' is therefore not allowed access.

I can temporarily solve this by remapping the URL so the resources are loaded from the package domain but this seems to be a hack. I would prefer to have the resources served with a CORS header.

Is there any way to configure Salesforce to allow documents and static resources to be loaded from a managed package domain and have the correct CORS header applied? I did try the CORS Whitelisted Origins system but that only seems to work for REST calls.

Thanks.
 - Andy
Hi,
 
I need to display a Lightning Component in a modal popup form, just like when you click Edit on an Opportunity or Account page. From reading the Aura source code I can see that I need to make use of ui:panel and/or ui:modal as these implement the LDS concept of “Modals” and take care of hiding the page’s scrollbar. I can’t find any examples of how to use them from inside Lightning or Visualforce.
 
Can anyone assist?
 
Thanks.

- Andy
Are there Lightning components available to render related lists for standard objects? I need to display the “Notes & Attachments” related list plus a list for Activities in my page sidebar. I had assumed that there would be a generic mechanism available for handling this but no luck finding it so far.

Thanks.

- Andy
SalesMethods is looking for an experienced developer to help us develop our range of Salesforce applications. The work will focus on application design and implementation, but will also require UI graphical design and occasional customer liaison. The projects are challenging and very rewarding for developers who enjoy solving complex problems. The candidate must be self-sufficient, able to manage their own time and to lead a project when required.
 
This will be a great role for someone with commercial experience of:
  • Modern JavaScript development and best practices.
  • HTML and CSS.
  • OO design in any modern language.
  • UI design for web applications.
  • jQuery and Salesforce experience is ideal but not essential. 
We need someone based in the UK, ideally around the Midlands or London area to join our development team and evolve our existing HTML5 applications. This is a full time role and one that is integral to the success of our business. You can choose to work in one of our UK offices or from home or probably do a bit of both. You will be reporting straight to the CTO so you will have an opportunity to make a real difference. Our work environment is informal, creative and committed. 
 
SalesMethods is focussed on bringing the 'how to do' of selling to the 'what to do' of CRM. We are a five year old company that has been through its embryonic and start up phases and is now ready to take on the world!
 
Please take a look at our current applications on AppExchange to see what we are working on:
As a first step please send your CV to hr@salesmethods.com (mailto:hr@salesmethods.com).
 
Good luck!
 
Andy Larter
SalesMethods CTO
 
Salesforce is now listing Sandbox installs in the LMA licenses page. There does not seem to be a standard way of identifying if the install is on a sandbox or production org and this was causing confusion for our sales team.

As a temporary workaround we are using a formula field on the license object and this returns 'Sandbox', 'Production', or 'Unknown' based on the org id. You can use of this formula until Salesforce release a better method. (If you find missing orgs, please post an update)

IF(
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'J' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'K' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'L' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'M' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'N' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'O' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'P' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'Q' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'R' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'S' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'T' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'V' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'W' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'Z' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'c' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'e' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'f' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'g' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'm' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'n' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'q' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = '1', 'Sandbox',

IF (
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'A' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'B' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'C' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'D' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'E' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'F' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'G' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'U' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'a' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'b' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'd' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'i' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'o' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = '0' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = '2' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = '3' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = '4' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = '5' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = '6' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = '7' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = '8' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = '9' , 'Production', 'Unknown' ) )

Hi,

 

I am getting a strange result from isUpdateable when installing into a Professional Edition (PE) org.

 

I have a custom object that contains a Number field StatusValue and a Long Text Area field called Evidence. This is part of a managed package that was been security reviewed.

 

In my test class I have the following lines:

Boolean statusChangeAllowed = Schema.sObjectType.SalesMethods__MSO_Question__c.fields.SalesMethods__StatusValue__c.isUpdateable();

Boolean evidenceChangeAllowed = Schema.sObjectType.SalesMethods__MSO_Question__c.fields.SalesMethods__Evidence__c.isUpdateable(); 

 

 

When installing into an Enterprise org these are always true. They should only be false if the current user has read-only access to the object which is not the case for the test user.

 

When I install my product into a Professional Edition org evidenceChangeAllowed is true but statusChangeAllowed is set to false. I have no idea why a numeric field would be read-only in a PE org.

 

Can anyone explain why a number field in a custom object would be read-only when installing into a PE org.

 

Thanks.

-          Andy



Hi. I am in the process of providing some automation for my sales teams LMO. My code is trying to set the status of a license to Active and this is failing with a validation error. The code is running in a test org. The licence, package version, and package have been created in a test method.

 

Have I missed some vital data from one of the LMA objects or is there some magic to changing the license status?

 

This error is raised on the update of the license:



20:49:10.362 (362243000)|EXCEPTION_THROWN|[39]|System.DmlException: Update failed. First exception on row 0 with id a06D000000PVrETIA1; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Argument 1 cannot be null: []

 

The test code is:



sfLma__Package__c pkg = new sfLma__Package__c(
	Name = 'Licence Testing',
	sfLma__Release_Date__c = Date.parse('01/01/2010'),
	sfLma__Package_ID__c = '033A00000000000IAA' );
insert pkg;

sfLma__Package_Version__c pkgVer = new sfLma__Package_Version__c(
	Name = 'Licence Testing Jan 2010',
	sfLma__Version__c = 'Jan-10',
	sfLma__Version_ID__c = '04tA00000000000IAA',
	sfLma__Package__c = pkg.Id,
	sfLma__Release_Date__c = Date.parse('01/01/2010') );
insert pkgVer;

Lead ld = new Lead(
	LastName	= 'Customer',
	FirstName	= 'Test',
	Company		= 'MyTestCompany',
	Email		= 'test@MyTestCompany.com',
	sfLma__Subscriber_Org_Type__c = 'EE' );
insert ld;

sfLma__License__c testLic = new sfLma__License__c(
	sfLma__Lead__c=ld.Id,
   	sfLma__Status__c='Trial',
    	sfLma__Package_Version__c=pkgVer.Id,
    	sfLma__Seats__c=40,
    	sfLma__Subscriber_Org_ID__c = UserInfo.getOrganizationId(),
    	sfLma__Package_License_ID__c='Testing',
    	sfLma__Used_Licenses__c=22 );
insert testLic;


System.debug([Select sfLma__Used_Licenses__c, sfLma__Subscriber_Org_ID__c, sfLma__Status__c, sfLma__Seats__c, sfLma__Proxy_User__c, sfLma__Package_Version__c, sfLma__Package_License_ID__c, sfLma__Licensed_Seats__c, sfLma__License_Type__c, sfLma__License_Status__c, sfLma__Lead__c, sfLma__Install_Date__c, sfLma__Help__c, sfLma__Expiration__c, sfLma__Expiration_Date__c, sfLma__Contact__c, sfLma__Account__c, RecordTypeId, Name, Id From sfLma__License__c WHERE Id=:testLic.Id]);

testLic.sfLma__Status__c='Active';

update testLic;

 

Thanks.

 

-       Andy



Hi.

 

I am experiencing the corruption of my JavaScript code when delivered through VisualForce. The code is embedded in my page rather than being held in a separate JS file.

 

The offending section of the original code looked something like this:

<apex:page showHeader="false" sidebar="false"> 
	<script type="text/javascript">
		function SMTInitCheckboxes() 	
		{
			for (var i=0;i<iMax;++i)

 

 

When this gets loaded into the browser I get a JavaScript error. Viewing the code in the browser shows that the text has been modified from my original source:

<script type="text/javascript">
  function SMTInitCheckboxes()  
  {
   for (var i=0;i<iMax className="SMTTRError" ;++i)

 

You can see that ‘className="SMTTRError"’ has magically appeared in the middle of the FOR statement. This is text from much further down the page. I assumed that I had a JavaScript bug and commented out the code but this did not fix the problem.

 

I systematically eliminated all of the VisualForce, HTML and JavaScript until I got the entire page content down to this:

<apex:page showHeader="false" sidebar="false">
<script type="text/javascript">
(i=0;i<iMax;i)
</script>
</apex:page>

The received HTML code (according to FireBug) is as follows. Notice the space between iMax and the semi-colon. The problem is still occurring but only the extra space is being added.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html><head></head><script type="text/javascript">
(i=0;i<iMax ;i)
</script></html>

 

 

I have done the following to try and eliminate the problem with no success:

  • Commented out the JavaScript.
  • Wrapped the JavaScript in CDATA sections.
  • Used different browsers (IE and FireFox).
  • Tried delivering the same content through IIS.

 

Can anyone suggest why my code is being corrupted? It looks like some kind of buffer error in the SFDC parser or page builder but I am hoping it is something that I have screwed up.

I hope to avoid having to move all of my JavaScript into separate JS files simply due to the large number of pages involved.

 

Thanks for your help.

I am planning on developing multiple products that ship via AppExchange. Although the products can be used independently, we would like them to be integrated if two or more are installed.

 

1) Can I reference objects, Apex classes, and VF pages of one product from another?

 

2) Can I make a custom object link to an object from a different product (and without forcing a dependency)?

 

3) Is there a standard method of determining if a product is installed using Apex?

 

4) Am I correct in assuming that each product must be implemented in its own org and each with a unique namespace?

 

Many thanks.

Andy

Hi,

I am trying to find a way to lock an Opportunity and all child objects once the Opportunity is closed. I can restrict access by putting conditions on the standard buttons (to show an error message, etc), but a malicious user could bypass these. Also this does not protect detail objects, such as those from a 3rd party vendor.

I would like to force the restrictions using access rights, perhaps by setting them in a trigger as the Opportunity becomes closed. Ideally all users except Administrators should be denied access once the Opportunity has become closed.

Is this possible?

Many thanks.

-          Andy

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

 

I have an Apex class that exposes a function through the WebServices interface. The function has a number of parameters that are based on the same type. When I call this function from Flex, the data that I am passing is being put into the wrong parameters. I am not sure if this is a bug in Salesforce, the Force.com toolkit, or Flex.

 

My flex code passes 2 Id values via the deletedEntitiesIds parameter. The other three collections are empty.

 

var deletedTeamMembersIds:Array = new Array; var deletedEntitiesIds:Array = new Array; var deletedTeamIntimacyIds:Array = new Array; var deletedRelationshipsIds:Array = new Array; deletedEntitiesIds.push( id1 ); deletedEntitiesIds.push( id2 ); var args:Array = [ new Parameter( "OpportunityId", _opportunityId ), new Parameter( "instanceNumber ", _instanceNumber ), new Parameter( "deletedIntimacies", deletedTeamIntimacyIds, true ), new Parameter( "deletedRelationships", deletedRelationshipsIds, true ), new Parameter( "deletedEntities", deletedEntitiesIds, true ), new Parameter( "deletedTeamMembers", deletedTeamMembersIds, true ) ]; _force.execute( "MSO_OrgChart_WebService", "updateOrgChart_Delete" , args, new AsyncResponder(SaveToSalesforce_DeleteHandler, SaveToSalesforceFaultHandler), "SalesMethods" );

 

 

The Apex function just writes the collections into the debug log:

 

 

global with sharing class MSO_OrgChart_WebService { WebService static UpdateResult updateOrgChart_Delete( Id OpportunityId, Integer instanceNumber, List<Id> deletedIntimacies, List<Id> deletedRelationships, List<Id> deletedEntities, List<Id> deletedTeamMembers ) { System.debug( deletedIntimacies ); System.debug( deletedRelationships ); System.debug( deletedEntities ); System.debug( deletedTeamMembers ); } }

 

 

As the debug log shows, the Id values are now in the deletedIntimacies collection rather than in the deletedEntities collection.

 

20091110211500.108:Class.SalesMethods.MSO_OrgChart_WebService.updateOrgChart_Delete: line 379, column 1: (a0X80000001v3n5EAA, a0X80000001v3omEAA) 20091110211500.108:Class.SalesMethods.MSO_OrgChart_WebService.updateOrgChart_Delete: line 380, column 1: () 20091110211500.108:Class.SalesMethods.MSO_OrgChart_WebService.updateOrgChart_Delete: line 381, column 1: () 20091110211500.108:Class.SalesMethods.MSO_OrgChart_WebService.updateOrgChart_Delete: line 382, column 1: ()

 

 

 

Am I doing something wrong or is this another Force/Flex bug?

 

 

Many thanks,

 

Andy

Hi all,

 

Is it possible for Salesforce to hold the details for non-Salesforce people?

 

My company has a large number of non-sales staff who don't need access to Salesforce. I would like to have Salesforce just track their contact details. Ideally I would enter them into the Users table but this would count as licence users.

 

Is there any way to mark them as non-users or perhaps put them into another table?

 

Many thanks.

Andy

Hi,

I have a flex application that runs in a visualforce page. The application communicates with Salesforce by using queries and WebService SOAP commands.

For a week or so, I have received this error whenever I make a call to an Apex class:

 

fault.faultstring = MSO_ValueMill_WebService: no access allowed to this class. fault.faultcode = sf:INSUFFICIENT_ACCESS fault.detail = null

 

MSO_ValueMill_WebService is the name of my Apex class. This class has been working fine and passes its unit tests. I have checked the security settings for the class and have allowed access to all profiles.

Normally the flex application runs in a hosted web browser as part of a visualforce page. It gets its credentials through the flash parameters, like this.

 

var lr:LoginRequest = new LoginRequest(); lr.callback = new AsyncResponder(LoginSuccess, LoginFailed); lr.session_id = parameters.session_id; lr.server_url = parameters.server_url; _opportunityId = parameters.OppId;

 

 

Interestingly, if I change the flex code to use hard-coded credentials then the program runs without the error, even though the credentials are the same as those used to log into the Salesforce web page and the objects being accessed are the same. The working code looks like this:  

lr.username = "someaddress@MyLogin.co.uk"; lr.password = "passwordSession"; _opportunityId = "0068000000RCFOF";

 

 

It should also be noted that the system does not write an entry to the debug log.

Can anyone suggest why accessing a WebService class should fail when using the web page session but not when accessing it with a username/password?

  

Many thanks.

Andy

 

I'm having a problem with a Visualforce custom component where upon invoking Save, a numeric value is changing from null to zero.

 

One of my custom objects has a numeric field called Q1Status. This is marked as not required and has no default value.

 

After creating an empty object in the database, the value Q1Status is null. I can show this by executing a query in the System Log.

 

15:20:57 DEBUG - Executing: System.debug( [SELECT Id, Opportunity__c, Q1Status__c FROM MSO_Process__c WHERE Opportunity__c='0068000000OPGlbAAH'] ); 15:20:58 INFO - 20090821142059.532:AnonymousBlock: line 1, column 15: SOQL query with 1 row finished in 22 ms 20090821142059.532:AnonymousBlock: line 1, column 1: (MSO_Process__c:{Opportunity__c=0068000000OPGlbAAH, Id=a0980000003cgj3AAA})

 

(Q1Status is missing from the returned data, so I'm assuming this means it is null)

 

 

On my Visualforce edit page I am invoking my custom component like this:

 

<c:MSO_Status_Colour value="{!MSO_Process__c.Q1Status__c}" selName="Colour1"/>

 

The component looks like this:

 

<apex:component> <apex:attribute name="value" description="Status field" type="Double" required="true"/> <apex:attribute name="selName" description="Selection tag name" type="String" required="true"/> <apex:attribute name="readonly" description="Read-only or edit control" type="Boolean" default="false"/> <apex:OutputPanel rendered="{!!readonly}"> <apex:inputHidden value="{!value}" id="statusValue" /> </apex:OutputPanel> </apex:component>

 

 

Clearly the component makes no change to the value passed in.

 

If I now open the edit page of the new object and inspect the HTML, I can see that the value being passed into the html input tag is null (or more specificly is not set).

 

If I click Save on the edit page and reinspect the database I find that the value of Q1Status is now 0.

 

14:18:09 DEBUG - Executing: System.debug( [SELECT Id, Opportunity__c, Q1Status__c FROM MSO_Process__c WHERE Opportunity__c='0068000000OPGlbAAH'] ); 14:18:10 INFO - 20090821131811.473:AnonymousBlock: line 1, column 15: SOQL query with 1 row finished in 11 ms 20090821131811.473:AnonymousBlock: line 1, column 1: (MSO_Process__c:{Q1Status__c=0, Opportunity__c=0068000000OPGlbAAH, Id=a0980000003cgY5AAI})

 

 

Can anyone say if this is working as intended or is just a bug? Is there a work around?

 

Interestingly, if I comment out the apex:inputHidden line, the problem goes away.

 

 

Many thanks.

 

- Andy

I am trying to do a SOQL case insensitive text search on fields that have been encrypted with a “Deterministic – Case Insensitive” key. It seems that the query will only match case sensitive.

I have a Contact with the FirstName as “Andy”. Matching “Andy” results in a match but “andy” or “ANDY” results in no match.
SELECT Id, Name FROM Contact WHERE FirstName='Andy' => Found
SELECT Id, Name FROM Contact WHERE FirstName='andy' => Not found
SELECT Id, Name FROM Contact WHERE FirstName='ANDY' => Not found

Is this Salesforce Platform Encryption working as intended?
Is it possible to make the SOQL query case insensitive?

Thanks.
- Andy
Hi,
 
I need to display a Lightning Component in a modal popup form, just like when you click Edit on an Opportunity or Account page. From reading the Aura source code I can see that I need to make use of ui:panel and/or ui:modal as these implement the LDS concept of “Modals” and take care of hiding the page’s scrollbar. I can’t find any examples of how to use them from inside Lightning or Visualforce.
 
Can anyone assist?
 
Thanks.

- Andy
I have to say that when you are working on one-record, a single-page type paradigm like Lightning works nice.

But for navigation, I think good ol' URLs fetching a new page is just better, better, better, better.

For Setup, I think Lightning is going to make our lives as developers much much harder and I wish SF would abandon the effort.  In the good ol' days of most of setup, you get a nice page with the create and modification dates and users.  So if something in a trigger breaks, you can check who developed it last, then you can grab the URL and mail it to the developer.

Try that with process builder.  You get a mod date and that's it.  You don't get a name of the last modification and you don't get a URL.  If a trigger breaks, you can email the URL.  If a process breaks, you can't email a URL. 

Yeah, Lightning looks pretty.  But I sure hope all of setup never never never migrates to Lightning.

Hi all, 

I have a strange problem: I have  map as: 

Public map<Sobject__c,String> calresult{get;set;}

 

which i am initialising in constructor, and when values a inserted into a textbox i am putting them in my map,

But problem is this when i want to display it, I use system.debug() to see the map is filled or not, Its filled but when i am tring to fetch the first map value as: calresult.get(object); it always return null,

1.The value is in the map

2.No values are removed form the map

 

But it always return null .Help!

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

Also i found that the first value is not equal to my object as one field which is numaric with value 12.0 is 12 inside my map, but my map is same type as of the object.?

  • November 06, 2012
  • Like
  • 0

Since today, we're experimenting a problem in All our orgs (development, sandbox, production). When the system is trying to make some queries, this errors is showing up:

 

Cannot follow the same foreign key relationship twice name_of_the_field__c

 

We didn't make any package and either install anything new. Just this morning started to crash! We're really worried about this because all our clients are stopped.

 

I think the problem comes from really old relationships that we've created (we've been working with SF for a long time), that have the same Child Relationship Name. But this relationships are in a package, and after conctacting with SF they don't allow to change it!

 

We're stuck at this point, with a case opened and waiting while our clients are stopped. Anyone else is experimenting something similar?

 

Any help will be really helpful.

 

Ricard.

Hi All,

 

I am seeing a substantial difference in the test coverage between the results in Eclipse and the results of Salesforce online UI.

 

Here is a concrete example. A controller class when running the test for it in Eclipse I get 99% coverage and only 3 lines are not covered.

 

On the other hand, when I run all test from Salesforce online UI (Setup | App Setup | Classes and using the Run All Test button) I get for the same class only 59% coverage. Moreover, if I click on this class and run the test for that class in Salesforce I still get 59%.

 

Has anybody seen something like this ?

 

Regards,

Fernando

Hi. I am in the process of providing some automation for my sales teams LMO. My code is trying to set the status of a license to Active and this is failing with a validation error. The code is running in a test org. The licence, package version, and package have been created in a test method.

 

Have I missed some vital data from one of the LMA objects or is there some magic to changing the license status?

 

This error is raised on the update of the license:



20:49:10.362 (362243000)|EXCEPTION_THROWN|[39]|System.DmlException: Update failed. First exception on row 0 with id a06D000000PVrETIA1; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Argument 1 cannot be null: []

 

The test code is:



sfLma__Package__c pkg = new sfLma__Package__c(
	Name = 'Licence Testing',
	sfLma__Release_Date__c = Date.parse('01/01/2010'),
	sfLma__Package_ID__c = '033A00000000000IAA' );
insert pkg;

sfLma__Package_Version__c pkgVer = new sfLma__Package_Version__c(
	Name = 'Licence Testing Jan 2010',
	sfLma__Version__c = 'Jan-10',
	sfLma__Version_ID__c = '04tA00000000000IAA',
	sfLma__Package__c = pkg.Id,
	sfLma__Release_Date__c = Date.parse('01/01/2010') );
insert pkgVer;

Lead ld = new Lead(
	LastName	= 'Customer',
	FirstName	= 'Test',
	Company		= 'MyTestCompany',
	Email		= 'test@MyTestCompany.com',
	sfLma__Subscriber_Org_Type__c = 'EE' );
insert ld;

sfLma__License__c testLic = new sfLma__License__c(
	sfLma__Lead__c=ld.Id,
   	sfLma__Status__c='Trial',
    	sfLma__Package_Version__c=pkgVer.Id,
    	sfLma__Seats__c=40,
    	sfLma__Subscriber_Org_ID__c = UserInfo.getOrganizationId(),
    	sfLma__Package_License_ID__c='Testing',
    	sfLma__Used_Licenses__c=22 );
insert testLic;


System.debug([Select sfLma__Used_Licenses__c, sfLma__Subscriber_Org_ID__c, sfLma__Status__c, sfLma__Seats__c, sfLma__Proxy_User__c, sfLma__Package_Version__c, sfLma__Package_License_ID__c, sfLma__Licensed_Seats__c, sfLma__License_Type__c, sfLma__License_Status__c, sfLma__Lead__c, sfLma__Install_Date__c, sfLma__Help__c, sfLma__Expiration__c, sfLma__Expiration_Date__c, sfLma__Contact__c, sfLma__Account__c, RecordTypeId, Name, Id From sfLma__License__c WHERE Id=:testLic.Id]);

testLic.sfLma__Status__c='Active';

update testLic;

 

Thanks.

 

-       Andy



Hello Guys,

                      I need to create hierarchical table like below. from single Custom Object.Visula force page contains Four lookup fields input fields.

 

   

Warehouse             Product               Serials                Button

                        

                                Product 1             0000-1

Warehouse 1                                      0000-2      

                                Product2              0000-3  

                                                               0000-4

 

     Thaank You,

     Raghu 

Hi.

 

I am experiencing the corruption of my JavaScript code when delivered through VisualForce. The code is embedded in my page rather than being held in a separate JS file.

 

The offending section of the original code looked something like this:

<apex:page showHeader="false" sidebar="false"> 
	<script type="text/javascript">
		function SMTInitCheckboxes() 	
		{
			for (var i=0;i<iMax;++i)

 

 

When this gets loaded into the browser I get a JavaScript error. Viewing the code in the browser shows that the text has been modified from my original source:

<script type="text/javascript">
  function SMTInitCheckboxes()  
  {
   for (var i=0;i<iMax className="SMTTRError" ;++i)

 

You can see that ‘className="SMTTRError"’ has magically appeared in the middle of the FOR statement. This is text from much further down the page. I assumed that I had a JavaScript bug and commented out the code but this did not fix the problem.

 

I systematically eliminated all of the VisualForce, HTML and JavaScript until I got the entire page content down to this:

<apex:page showHeader="false" sidebar="false">
<script type="text/javascript">
(i=0;i<iMax;i)
</script>
</apex:page>

The received HTML code (according to FireBug) is as follows. Notice the space between iMax and the semi-colon. The problem is still occurring but only the extra space is being added.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html><head></head><script type="text/javascript">
(i=0;i<iMax ;i)
</script></html>

 

 

I have done the following to try and eliminate the problem with no success:

  • Commented out the JavaScript.
  • Wrapped the JavaScript in CDATA sections.
  • Used different browsers (IE and FireFox).
  • Tried delivering the same content through IIS.

 

Can anyone suggest why my code is being corrupted? It looks like some kind of buffer error in the SFDC parser or page builder but I am hoping it is something that I have screwed up.

I hope to avoid having to move all of my JavaScript into separate JS files simply due to the large number of pages involved.

 

Thanks for your help.

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

 

We are trying to create a standard salesforce record  directly from within our app. After the record is created, we should obtain the recordId and use it further in our application.

We have encountered problems to accomplish this in LEX.

There are two way to work with new records.
1. Use force:createRecord.
2. Use Lightning Data Service

However, the problem with force:createRecord is that we are unable to obtain the recordId after the creation as the user is directly redirected to the record's home page and there is no documented way to intercept this and obtain the recordId.

The problem with the Lightning Data Service is that it is unable to automatically render the object's entry standard layout, we need to manually specify fields which is a show stopper as it's required that the user are able to change the layout that will reflect in our application. The only place where Lightning Data Service load a form automatically is when we want to edit a record, not create one...

How can we accomplish the following:

1. Display a standard layout for a given object during the creation of the record.
2. Prepopulate some fields.
3. Collect recordId after the record is created.
4. Redirect user to our custom page so we could utilize the recordId.

Any help would be much appreciated.