• Ken Koellner 7
  • NEWBIE
  • 40 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 69
    Questions
  • 67
    Replies
We have the feature on that enabled strict picklist for the State field in addresses such as in Lead.  We do not want to configure intergration values as we want the state names, e.g., "Texas" to be used everywhere.

An external system is sending state code, .e.g, "TX".  I was hoping to write a trigger on Lead that runs on before insert that translates the value.

The code below is a portion of the code run in the before trigger...
Map<String, Integration_State_Map__mdt> stateMap = Integration_State_Map__mdt.getAll(); 
        for (Lead leadIter : newLeadList) {
            if (String.isBlank(leadIter.State)) {
                continue;
            }
            Integration_State_Map__mdt stateEntry = stateMap.get(leadIter.State);
            if (stateEntry != null) {
                leadIter.State = stateEntry.State_Name__c;
            }
            System.debug('\n' + JSON.serializePretty(leadIter));
        }

I can see that the trigger is indeed translating the state value.  Note the Sytem.debug statement above.  Below is a portion of the output showing that state is "Texas" and not "TX".

{
  "attributes" : {
    "type" : "Lead"
  },
  "Company" : "foo2",
  "DoNotCall" : false,
  "HasOptedOutOfFax" : false,
  "OwnerId" : "0055e000006PjyxAAC",
  "RecordTypeId" : "0125e000000qlvFAAQ",
  "CountryCode" : "US",
  "Status" : "Not Started",
  "IsConverted" : false,
  "IsUnreadByOwner" : false,
  "HasOptedOutOfEmail" : false,
  "State" : "Texas",
  "LastName" : "foo1"
}
A portion of the log with the error is shown below.
 
13:01:13.537 (1604369671)|CODE_UNIT_FINISHED|LeadInsert on Lead trigger event BeforeInsert|__sfdc_trigger/LeadInsert
13:01:13.537 (1610792921)|DML_END|[5]
13:01:13.537 (1611266013)|VF_PAGE_MESSAGE|There's a problem with this state, even though it may appear correct. Please select a state from the list of valid states.
13:01:13.537 (1611458601)|EXCEPTION_THROWN|[5]|System.DmlException: Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, There's a problem with this state, even though it may appear correct. Please select a state from the list of valid states.: [State]
13:01:13.537 (1612090942)|HEAP_ALLOCATE|[5]|Bytes:216
13:01:13.537 (1612311151)|FATAL_ERROR|System.DmlException: Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, There's a problem with this state, even though it may appear correct. Please select a state from the list of valid states.: [State]

I would think if the value is changed before trigger, it would accept the value.  I don't undestand why it is still complaining.

Any ideas how to get this to work????
When uploading a Chatter Photo, there is the option -- Show my photo on publicly accessible pages.

I see when uploading a photo that the field IsProfilePhotoActive is set to true.

I cannot find a field in User that represents the publicaly accessible option.  I see a field named IsExtIndicatorVisible but that does not appear to be it as I have that option on in my User and the field is still false.

Anyone know if that value is available or not in a field somewhere?

(Please answer if you know for sure and then I will vote your answer as best answer.  Please don't guess if not sure and then ask for vote for best answer.)

I tried SOQL Query Builder in VSCode and right now, I'm sticking with workbench until and unless I can solve a copy issues.

In workbench, I can highlight the output of a query, which is just HTML in a browser, and copy-and-paste it.  Works great, I get a table in a new email or Excel or whatever.  In SOQL-Builder in VSCode, I can find no way to copy and paste from the result area.

I've tried the two export buttons .csv and .json.  That would actually be less convenient, but they don't do anything.  I click them and nothing happens.  

Still waiting for a really good SOQL query tools but so far SOQL Query Builder in VSCode ain't it.

There's a checkbox on the VF page edit form labelled "Available for Lightning Experience, Experience Builder sites, and the mobile app"

I want to configure pages that are available on Lightning Desktop but not the Mobile App.  I'm wondering if that lable is at all correct.  I have some pages with it checked and some pages without it checked.  All are available on Lightning desktop but the unchecked ones aren't available in Mobile.  So maybe that box does what I want.  But I'm wondering why it contains "Lightning Experience" in the label if a page is available in Lightning without it checked?????

I read the documentation on Apex Hammer.  I find that there's just enough information not to be useful.

The high-level info on when and where it runs appears to be absent.  There's nothing about whether it is on or off in an org.  Nothing on how to actually get it to run in an org.  Does it run in Prod orgs, Sandbox orgs, Dev orgs?  How to tell if it's on in an org?  How to tell if it has run?  How to determine if there are results and if so, to get to those results?

Anyone know if that is documented anywhere or can fill in on the details.

I have already read the two documents below and to not see the answer to these questions in these documents.

 

https://help.salesforce.com/s/articleView?id=apex_hammer_execution_status.htm&language=en_US&type=5

 

https://developer.salesforce.com/blogs/engineering/2013/05/here-comes-the-hammer

 

I seem to recall when the Flex Queue feature was release six or seven years ago, you had to do something to enable it.

I spun up a new org just to check.  When I search on "Flex Queue" in Setup, there is no option to turn it on.  The page shown is the Apex Flex Queue page with the (empty) list of jobs.  That would lead me to believe that Flex Queue is now on by default.
I'm writing Apex trigger code to handle Change Data Capture.  I've written test methods to handle change events.  But I've also written code to hanlde GAP_CREATE, GAP_UPDATE, GAP_UNDELETE, GAP_UNDELETE, and GAP_OVERFLOW.  I don't see anything in the documentation to simulate those Events.  Regular DMLs can be done and Test.spot() can be used to send the regular Events.

Anyone know how to send these Events in an Apex Test Method?

(Please, if you knowledge does not extend to handling GAP events in CDC, do not answer with some other answer that is not germane to this question.)

I want to start prototyping a Lightning Web Component to create AND edit a record in a custom object.  All the examples I found have one component for Edit and one Component for Create.  

Anyone have an example of a component that does BOTH edit AND create?

 

I have some Apex code that inserts Events and EventRelation records and I'm doing a bit of work on it.  It is coded to insert multiple EventRelation records and the relationId field on those records may point to various Leads.  I set IsInvitee on the records to false.  But when I read those records back, the Isinvitee field is being change to true.  I have't found anything on the behavior in the documentation. The documentation appears to state that only one Lead may be associated with the Event but that seems incorrect.  I created an Event with the Lightning UI, and we easily able to start for multiple Leads and add them.  An image is shown below and the records are shown below.

I want to do the same thing in Apex but leave IsInvitee as false.  Anyone know if there's a way to force that? 

 

Both Bertha Boxer and Phyllis Cotton are LEads.
User-added image

Note that both records have 00Q in RelationId indicating a Lead.

AccountId	EventId	Id	IsInvitee	IsParent	IsWhat	RelationId	Status
1		00U2M00000QFPxZUAX	0RE2M00000MrGQQWA3	true	false	false	00Q4100000JQczNEAT	New
2		00U2M00000QFPxZUAX	0RE2M00000MrGQPWA3	true	false	false	00Q4100000JQczOEAT	New

 

I'm working with Change Date Capture and have a trigger EventChangeEvent (after insert) so I can handle the change in Apex.

My test method works fine with "insert Event".  The change is delivered and the trigger is fired and all downstream processing in Apex (including a subsequent Queueable) works fine.

My test method for delete isn't working.  The Change Event is never delivered to the trigger.  The @setup method sets up the data I want to delete in the test.  The logic is --

Event myEvent = [ SOQL query to get Event that was inserted in @setup];

Test.enableChangeDataCapture();
Test.startTest();

delete sfEvent;

Test.getEventBus().deliver();

Test.stopTest();

The reason there is both a deliver() and a stopTest() is that the deliver should cause the Change record to be delivered.  The stopTest() will fire a Queueable.   I used that exact pattern in my insert test and it works fine.

My insert test has logic like shown below and it works fine.  First the change event is delivered to the trigger and then the queueble runs.  (If I don't put in the deliver() call, things run out of order and the result is incorrect.)

Test.enableChangeDataCapture();
Test.startTest();

Event sfEvent = new Event (fill in fields in Event);
insert sfEvent;

Test.getEventBus().deliver();

Test.stopTest();

This isn't so much a question as an observation, unless someone knows a work around.

It's nice the Apex debug logs now show an explanation of the query plan for SOQL as shown below --
 

10:00:09.343 (6541134992)|SOQL_EXECUTE_EXPLAIN|[150]|Index on Event : [Meeting__c], cardinality: 1, sobjectCardinality: 12760, relativeCost 0.001


However, it only does that for static SOQL.  For dynamic SOQL, it doesn't show a query plan--

10:00:09.343 (6677301225)|SOQL_EXECUTE_EXPLAIN|[312]|No explain plan is available

There are some cases where I wanted to check that a generated query was efficient so I had to extract the SOQL generated, then run it manually in Dev Console to check it.

It would be nice if debug also showed query plans for Dynamic SOQL.
<ui:inputText click="{!c.onfocus}" updateOn="keyup" keyup="{!c.keyPressController}" class="slds-lookup__search-input slds-input leftPaddingClass" value="{!v.searchTerm}" placeholder="search..."/>
Support for the ui: tags is supposed to be ending.  What I don't see in the lightning: tags is an equivelent to ui:inputText.  I have the tag above and am wondering what the best thing to replace it with is and if the same options will be available.  I haven't found anything that exactly matches and so I'm researching what to do to get the equivelent functionality.
 
Question on when the next release hits the prerelease nodes.  I have a prerelease org I've been using for a while.  In Summer '21, the SLDS styles with "--" are supposed to be removed and the styles with "_" must be used instead.  I loaded a VF page in one of my orgs running on a prerelease node.  I see items like ".slds-tabs--default" in the sheet in addition to items like ".slds-tabs_default".  I would think that indicates either Summer '21 as not fully hit this prerelease node or that the change is not exactly as was documented; this change was announced for Summer '21 back in the Winter '21 release notes.
We're noticed in one org that has 12 Process Builder flows that do field updates on fields on Events, that everytime the record is updated, the trigger filres 13 times.  Anyone know is that is new behavior in Spring '21 or if it always was that way?

Yes, I know it would be much bette to use before-save flows but this isn't our org so we can't change it.
I'm experimenting with Change Event Apex Triggers to subscribe to Change Data Capture.  My simple tests just to inspect the payloads work fine.  The documentation says the batch size can be up to 2000 records.  The use case I'm considering involves a fair amount of work doing callouts and would likely fail with a batch that large.  What I'd like to do is limit the batch size.  I know there is a way to do that with triggers on Platform Events.  But, I do not know if that can be done on Change Event Triggers.  Does anyone know if batch size can be limited specifically on Change Event Triggers?  If so, how to do it?



I know everyone wants to be as helpful as possible but please read the question carefully.  It won't help to answer a different question.
We have an existing testing utility that uses the Tooling API.  It is written using the SOAP version, not the REST version.  I know I can query for the latest log for the user.  I know there is a REST API to get the debug log body.  But, I'd rather not have to recode using REST or mix REST/SOAP if I don't have to. 

I tried the example below.  The getDebuggingInfo() call returns null.  If I got that back, I could call getDebugLog() on that to get the body.  The comments at the end are simply notes of where I would start if I wanted to mix in REST.
com.sforce.soap.tooling.LogInfo[] logList = new com.sforce.soap.tooling.LogInfo[1];
        logList[0] = new com.sforce.soap.tooling.LogInfo();
        logList[0].setCategory(com.sforce.soap.tooling.LogCategory.Apex_code);
        logList[0].setLevel(com.sforce.soap.tooling.LogCategoryLevel.Fine);        
        ExecuteAnonymousResult apexResult = conn.executeAnonymous ("System.debug('Hello.');");
        System.out.println(apexResult);
        com.sforce.soap.tooling.DebuggingInfo_element debuggingInfo = conn.getDebuggingInfo();
        System.out.println(debuggingInfo);
        com.sforce.soap.tooling.GetUserInfoResult userResult = conn.getUserInfo();
        String userId = userResult.getUserId();
        System.out.println(userId);
        // SELECT Id FROM ApexLog WHERE LogUserId = userId ORDER BY LastModifiedDate DESC LIMIT 1
        // /services/data/v49.0/sobjects/ApexLog/07L4p00000FU34uEAD/Body

Below is the output --
[ExecuteAnonymousResult  column='-1'
 compileProblem='null'
 compiled='true'
 exceptionMessage='null'
 exceptionStackTrace='null'
 line='-1'
 success='true'
]

null
005460000010bMfAA

Anyone know a way to get the Debug Log body with SOAP?  Or am I going to have to mix in a REST request?  Or maybe the flags aren't set properly to get the log and that's why getDebuggingInfo is returning null?
 
I know that when a Lead and an open Event are both ownere by user "A" and the Lead owner is updated to user "B" then the Event owner is automatically updated to have Owner "B".  I'd like to prevent that, or at least detect it so that I can do something down stream.

When I put debug on and update the Lead, I do not see Event udpate triggers fire.  Even the the Event is updated, the owner changes, and the Last Modified Date changes, it's as if no update DML happened.  I suspect that I can't do any work with an Update Trigger on Event to handle this situtation.

I suppose I could put an update trigger on Lead, then in that trigger do a query for open Events owned by the Lead, but I really don't want to get in the game of implementation another trigger.  I already have a trigger on Event that handles when the Owner may be updated and any other activity associated with the Event Owner change.
This release note https://releasenotes.docs.salesforce.com/en-us/winter21/release-notes/rn_slds_bem_deprecate.htm?edition=&impact= (https://releasenotes.docs.salesforce.com/en-us/winter21/release-notes/rn_slds_bem_deprecate.htm?edition=&impact=) says that versions 2.13.0 and newer of SLDS will change so that "--" will be replaced with "_".  We use SLDS in Visualforce via the <apex:slds/> tag.  Is there anyway to tell what version of SLDS is injected into the page?  I would think if it's a version 2.13.0 or newer then we will have to change any references with the old "--" to "_" which means change some VF code.  Anyone have any other thoughts on the impact of that notice and VF pages that use SLDS?
The Auth. Provider setup page allows entering a Customer Key and Consumer Secret.  We would like it to work so that after an admin has entered the secret, it cannot be viewed on the setup page, much like the way a password can work.  You can enter into the field but once saved, it become masked with stars and you can never view it again.  This setup page has a Reveal button that will show it.  Is there any way to disable that?



Please do not respond with an answer to a different but related question or a link to the documentation page [I have already read https://help.salesforce.com/articleView?err=1&id=sso_provider_global_auth.htm&type=5] and then ask for me to vote your answer best answer.  I will instantly vote your answer as best answer if it really answers this specific question.
I have a program that connects via the Parnter API does queries and DMLs.  I've set Debug Logging on for the User which the program uses to log in.  But, I'm not seeing any Debug Logs appear.  Could that be because the program is not sending debug headers in the request?  I can't modify the program.  I'm wondering if there is anything I can do to force SF to generate a debug log each time it makes a request.  I need to analyze some of the work it does.
I'd like to get the Sites domain that configured for an org via Apex in order to automate some setup work.  I haven't found a way to do that.  It's probably not there but just in case I missed it in the documentation I figured I'd ask if anyone knows if there's any kind of metadata call to get it.

This is not specific to any one site and VF is not in place so anything that only exists in the context of an executing Site will not work.
I have a VF page that uses Lightning Design System (SLDS) to get a Lightning look-and-feel.  It works fine in Classic and it's also totally fine that it looks like Lightning in Classic.  But I have an issue with an apex:inputField tag for an sObect field that is lookup(Account).  When in Classic, the lookup icon appears next to the field and it works fine.  But when in Lightning, the icon doesn't appear and the field just acts like a text entry field and doesn't work correctly.

Anyone know if there's a way to get the regular lookup dialog from an apex:inputField tag in a VF page using SLDS when in Lighting?

I did some searching and found some public code with examples for doing lookups (and also native Lightning aura code which I do not need).  But I'd had to take what could be a single tag in Classic and have to replace it with 150 lines of custom code to get it to work in Lightning.

Anyone know the easiest solution to get it to work?

 
We have the feature on that enabled strict picklist for the State field in addresses such as in Lead.  We do not want to configure intergration values as we want the state names, e.g., "Texas" to be used everywhere.

An external system is sending state code, .e.g, "TX".  I was hoping to write a trigger on Lead that runs on before insert that translates the value.

The code below is a portion of the code run in the before trigger...
Map<String, Integration_State_Map__mdt> stateMap = Integration_State_Map__mdt.getAll(); 
        for (Lead leadIter : newLeadList) {
            if (String.isBlank(leadIter.State)) {
                continue;
            }
            Integration_State_Map__mdt stateEntry = stateMap.get(leadIter.State);
            if (stateEntry != null) {
                leadIter.State = stateEntry.State_Name__c;
            }
            System.debug('\n' + JSON.serializePretty(leadIter));
        }

I can see that the trigger is indeed translating the state value.  Note the Sytem.debug statement above.  Below is a portion of the output showing that state is "Texas" and not "TX".

{
  "attributes" : {
    "type" : "Lead"
  },
  "Company" : "foo2",
  "DoNotCall" : false,
  "HasOptedOutOfFax" : false,
  "OwnerId" : "0055e000006PjyxAAC",
  "RecordTypeId" : "0125e000000qlvFAAQ",
  "CountryCode" : "US",
  "Status" : "Not Started",
  "IsConverted" : false,
  "IsUnreadByOwner" : false,
  "HasOptedOutOfEmail" : false,
  "State" : "Texas",
  "LastName" : "foo1"
}
A portion of the log with the error is shown below.
 
13:01:13.537 (1604369671)|CODE_UNIT_FINISHED|LeadInsert on Lead trigger event BeforeInsert|__sfdc_trigger/LeadInsert
13:01:13.537 (1610792921)|DML_END|[5]
13:01:13.537 (1611266013)|VF_PAGE_MESSAGE|There's a problem with this state, even though it may appear correct. Please select a state from the list of valid states.
13:01:13.537 (1611458601)|EXCEPTION_THROWN|[5]|System.DmlException: Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, There's a problem with this state, even though it may appear correct. Please select a state from the list of valid states.: [State]
13:01:13.537 (1612090942)|HEAP_ALLOCATE|[5]|Bytes:216
13:01:13.537 (1612311151)|FATAL_ERROR|System.DmlException: Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, There's a problem with this state, even though it may appear correct. Please select a state from the list of valid states.: [State]

I would think if the value is changed before trigger, it would accept the value.  I don't undestand why it is still complaining.

Any ideas how to get this to work????
When uploading a Chatter Photo, there is the option -- Show my photo on publicly accessible pages.

I see when uploading a photo that the field IsProfilePhotoActive is set to true.

I cannot find a field in User that represents the publicaly accessible option.  I see a field named IsExtIndicatorVisible but that does not appear to be it as I have that option on in my User and the field is still false.

Anyone know if that value is available or not in a field somewhere?

(Please answer if you know for sure and then I will vote your answer as best answer.  Please don't guess if not sure and then ask for vote for best answer.)
There's a checkbox on the VF page edit form labelled "Available for Lightning Experience, Experience Builder sites, and the mobile app"

I want to configure pages that are available on Lightning Desktop but not the Mobile App.  I'm wondering if that lable is at all correct.  I have some pages with it checked and some pages without it checked.  All are available on Lightning desktop but the unchecked ones aren't available in Mobile.  So maybe that box does what I want.  But I'm wondering why it contains "Lightning Experience" in the label if a page is available in Lightning without it checked?????

I want to start prototyping a Lightning Web Component to create AND edit a record in a custom object.  All the examples I found have one component for Edit and one Component for Create.  

Anyone have an example of a component that does BOTH edit AND create?

 

This isn't so much a question as an observation, unless someone knows a work around.

It's nice the Apex debug logs now show an explanation of the query plan for SOQL as shown below --
 

10:00:09.343 (6541134992)|SOQL_EXECUTE_EXPLAIN|[150]|Index on Event : [Meeting__c], cardinality: 1, sobjectCardinality: 12760, relativeCost 0.001


However, it only does that for static SOQL.  For dynamic SOQL, it doesn't show a query plan--

10:00:09.343 (6677301225)|SOQL_EXECUTE_EXPLAIN|[312]|No explain plan is available

There are some cases where I wanted to check that a generated query was efficient so I had to extract the SOQL generated, then run it manually in Dev Console to check it.

It would be nice if debug also showed query plans for Dynamic SOQL.
<ui:inputText click="{!c.onfocus}" updateOn="keyup" keyup="{!c.keyPressController}" class="slds-lookup__search-input slds-input leftPaddingClass" value="{!v.searchTerm}" placeholder="search..."/>
Support for the ui: tags is supposed to be ending.  What I don't see in the lightning: tags is an equivelent to ui:inputText.  I have the tag above and am wondering what the best thing to replace it with is and if the same options will be available.  I haven't found anything that exactly matches and so I'm researching what to do to get the equivelent functionality.
 
I'm experimenting with Change Event Apex Triggers to subscribe to Change Data Capture.  My simple tests just to inspect the payloads work fine.  The documentation says the batch size can be up to 2000 records.  The use case I'm considering involves a fair amount of work doing callouts and would likely fail with a batch that large.  What I'd like to do is limit the batch size.  I know there is a way to do that with triggers on Platform Events.  But, I do not know if that can be done on Change Event Triggers.  Does anyone know if batch size can be limited specifically on Change Event Triggers?  If so, how to do it?



I know everyone wants to be as helpful as possible but please read the question carefully.  It won't help to answer a different question.
We have an existing testing utility that uses the Tooling API.  It is written using the SOAP version, not the REST version.  I know I can query for the latest log for the user.  I know there is a REST API to get the debug log body.  But, I'd rather not have to recode using REST or mix REST/SOAP if I don't have to. 

I tried the example below.  The getDebuggingInfo() call returns null.  If I got that back, I could call getDebugLog() on that to get the body.  The comments at the end are simply notes of where I would start if I wanted to mix in REST.
com.sforce.soap.tooling.LogInfo[] logList = new com.sforce.soap.tooling.LogInfo[1];
        logList[0] = new com.sforce.soap.tooling.LogInfo();
        logList[0].setCategory(com.sforce.soap.tooling.LogCategory.Apex_code);
        logList[0].setLevel(com.sforce.soap.tooling.LogCategoryLevel.Fine);        
        ExecuteAnonymousResult apexResult = conn.executeAnonymous ("System.debug('Hello.');");
        System.out.println(apexResult);
        com.sforce.soap.tooling.DebuggingInfo_element debuggingInfo = conn.getDebuggingInfo();
        System.out.println(debuggingInfo);
        com.sforce.soap.tooling.GetUserInfoResult userResult = conn.getUserInfo();
        String userId = userResult.getUserId();
        System.out.println(userId);
        // SELECT Id FROM ApexLog WHERE LogUserId = userId ORDER BY LastModifiedDate DESC LIMIT 1
        // /services/data/v49.0/sobjects/ApexLog/07L4p00000FU34uEAD/Body

Below is the output --
[ExecuteAnonymousResult  column='-1'
 compileProblem='null'
 compiled='true'
 exceptionMessage='null'
 exceptionStackTrace='null'
 line='-1'
 success='true'
]

null
005460000010bMfAA

Anyone know a way to get the Debug Log body with SOAP?  Or am I going to have to mix in a REST request?  Or maybe the flags aren't set properly to get the log and that's why getDebuggingInfo is returning null?
 
I know that when a Lead and an open Event are both ownere by user "A" and the Lead owner is updated to user "B" then the Event owner is automatically updated to have Owner "B".  I'd like to prevent that, or at least detect it so that I can do something down stream.

When I put debug on and update the Lead, I do not see Event udpate triggers fire.  Even the the Event is updated, the owner changes, and the Last Modified Date changes, it's as if no update DML happened.  I suspect that I can't do any work with an Update Trigger on Event to handle this situtation.

I suppose I could put an update trigger on Lead, then in that trigger do a query for open Events owned by the Lead, but I really don't want to get in the game of implementation another trigger.  I already have a trigger on Event that handles when the Owner may be updated and any other activity associated with the Event Owner change.
This release note https://releasenotes.docs.salesforce.com/en-us/winter21/release-notes/rn_slds_bem_deprecate.htm?edition=&impact= (https://releasenotes.docs.salesforce.com/en-us/winter21/release-notes/rn_slds_bem_deprecate.htm?edition=&impact=) says that versions 2.13.0 and newer of SLDS will change so that "--" will be replaced with "_".  We use SLDS in Visualforce via the <apex:slds/> tag.  Is there anyway to tell what version of SLDS is injected into the page?  I would think if it's a version 2.13.0 or newer then we will have to change any references with the old "--" to "_" which means change some VF code.  Anyone have any other thoughts on the impact of that notice and VF pages that use SLDS?
Hi team, 

When I code something and deploy to a sandbox, something it fails if I made a mistake or something doesn't work with the configuration of the sandbox.   When it fails, it used to give a details reason such as:
row 3 col 5 illegal assignment of String in Number field 

However, for some reason it stopped giving reasons but just the outcome
Now it just says DeployFailed: Deploy Failed

I am not sure if something change in CLI or I made a wrong setting. 
Can anyone please help?

Thanks!!
We needs to use Schema and DesscribeSObjectResult classes to get all SObject in the user's organization. But we noticed performance problem after upgraded to API v44.
The following code could reproduce the issue:
Visualforce Page Code:
<apex:page controller="TestSchemaTimeController">
    <script type="text/javascript">
        function perform() {
            var args = [];
            var start = new Date().valueOf();
            args.push("{!$RemoteAction.TestSchemaTimeController.QuerySchema}");
            args.push(function(result, event) { var output = document.getElementById("output"); output.value += "Count:" + result + " Time:" + (new Date().valueOf() - start) + "ms\r\n"; });
            args.push({ buffer: false, escape: false, timeout: 120000 }); 
            window.Visualforce.remoting.Manager.invokeAction.apply(window.Visualforce.remoting.Manager, args);
        }
        function clearOutput() {
            var output = document.getElementById("output");
            output.value = "";
        }
    </script>
    <h1>Test Schema Time</h1>
    <div>
        <button onclick="perform()">Click</button>
        <button onclick="clearOutput()">Clear</button>
    </div>
    <div>
        <TextArea id="output" style="width:800px;height:600px"></TextArea>
    </div>
</apex:page>
Apex Code 
public class TestSchemaTimeController {
    @RemoteAction
    public static Integer QuerySchema() {
        Map<String, Schema.SObjectType> typeMap = Schema.getGlobalDescribe();
        for (Schema.SObjectType sot : typeMap.values()) {
            System.debug(sot);
            Schema.DescribeSObjectResult dsr = sot.getDescribe();
            //String name = dsr.getName();
            //Boolean acc = dsr.isAccessible();
        }
        return typeMap.values().size();
    }
}
By the demo code above, it cost about 250~300ms via API version 43, but cost about 1000~1600ms via API version 44. You could modify the API version of the Apex Class to verify the result.
API v45 preview in sandbox also have the performance issue.
We have no idea why this Apex method is slow down after API version 44. And we have to keep on using API version 43 now to make sure our customer not face the performane issue.
Anyone else meet the same problem?
  • January 28, 2019
  • Like
  • 0
Hello,

A third party application wants to read data from Salesforce.
So i will expose the salesforce.

They plan to read the data with POST.

How can i give the swagger to them ?
URL and sample JSON

Thank you in advance for suggestions
I'm seeking more info on lightning:input for use in a Lightning Component.

What I want to do is have the input text field submit when the user presses the Enter key. However, the Enter key seems to be ignored by lightning:input. Also, I can't even retrieve the keycode with my handler.

component markup:
                  <lightning:input aura:id="body"
                                         label=""
                                         name="Body"
                                         placeholder="Enter message..."
                                         value="{!v.Message.Body__c}"
                                         onchange="{!c.keyCheck}"/>

                    </lightning:layoutItem>
And my keyCheck handler:
keyCheck: function(component, event, helper){
        console.log(event.getParams('keyCode')); 
        }
The handler is getting called, but the value is undefined. I think it's undefined because the event that is happening is NOT the keypress/keyDown/keyUp, but rather the input field is changing. But lightning:input chokes (won't compile) if I try to add a keyDown event in its parameters in the markup.

BTW, I've tried doing this with ui:inputText as well, and that doesn't work either.

Help please?

 
Hello, is there any documentation that helps testing external web services endpoints using ZAP and Burp scanners?? I have searched everywhere in Google does not find a one. We are consuming web services from SAP. i.e., making callouts from Salesforce to SAP. Also, we are about to submit scan reports for the security review. This became a roadblock that we have difficulty to find right articles to start with. Please suggest. Would appreciate your help. Thanks a lot
I'm writing an IDE plugin and I prefer using the REST API.  For the Execute Anonymous resource:

http://domain/services/data/vXX.X/tooling/executeAnonymous/?anonymousBody=System.debug('Hello World');

The response is:

{"exceptionMessage":null,"compileProblem":null,"compiled":true,"exceptionStackTrace":null,"column":-1,"line":-1,"success":true}

How do I get access to the output/debug log?

Hello,

 

I am wrote this really simple trigger to stop the changing of the ownership of open activities.  Whenever account owner changes in SF, it changes all of the open activitiy owners of tasks to the new owner of the account.   We don't want that to happen.  Here's my code:

 

 

trigger StopTaskOwnerChange on Task (before update) {

    List<Task> updateTask = new List<Task>();
    
        for(Task t : trigger.new){
            if(t.ownerId != t.CreatedById)
                updateTask.add(t);
        }
        
        for(Task t : updateTask){
        t.ownerId = t.CreatedById;
        }

 


I am thinking this problem with this is probably has to do with timing of the execution of the trigger.  I know salesforce automatically changes all of the activity ownership automatically, and I am wondering if I'm firing my trigger before salesforce automatically changes the Owners so it looks the owner is not changing.