• Shahin__c
  • NEWBIE
  • 10 Points
  • Member since 2011
  • Technical Consultant
  • Execloud

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 6
    Replies
When trying to pass a collection of an apex defined objects to a lightning component getting the following error: 

"ByteCodeObjectInstance serialization is only supported for streams that implement the ExecutionContextProvider interface" 

in the flow screen which embeds the lightning component. doInit method of the lightning component controller does not run which suggests the component hasn't even initiated. 

The Apex defined class extends another class and all attributes have 
@AuraEnabled @InvocableVariable tags to allow access to them in both flows and lightning component. 

I was wondering if anyone else has come across this issue? and how to resolve it?

I will try and simplify above by first use single Apex-Defined object rathar than an array [] of the objects when inputing into the controller.

I'm following the guide from this release note and it mentions the supported data types which includes lists and complex objects (extended) classes

"Supported data types in an Apex class are Boolean, Integer, Long, Decimal, Double, Date, DateTime, and String. Single values as well as lists are supported for each data type. Multiple Apex classes can be combined to represent complex web objects."


https://releasenotes.docs.salesforce.com/en-us/summer19/release-notes/rn_forcecom_flow_data_integration.htm
 
xcode iOs simulator community login issue - followed the steps as provided by Mobile SDK development guide
- created a connected app with testsfdc:///mobilesdk/detect/oauth/done as callback URL
- created a community user with the expected set up and profile added to the community (https://dev-mycompany.cs83.force.com/engineer/)
- published the community
- I can successfully login to the community using "ionic serve" web emulator on local host "http://localhost:8101/"

On xcode simulator however the user is always directed to login.salesforce.com eventhough the login to community URL is specified as "https://dev-mycompany.cs83.force.com/engineer/" in config file, correct remoteAccessConsumerKey and callback url is specified.

Anybody had a similar issue and can think of an obvious error or something missed out above?
Hi,

While working on Mobile SDK modules, I created couple of connected apps, I mistakenly blocked "Trailhead Project" connected app instead of "Trailhead Test" and as a result got my playful-goat developer sandbox disconnected from trailhead. As I don't have any other logins to this sandbox, anyone knows how to restore the connection? How can I get support team to re-establish it for me? I don't want to create a new account as all my Trailhead points are already against this blocked user. Thanks in advance!

Hi all,

 

Has anyone else come across this issue? and if yes, how did you go about resolving it?

 

It happens when I'm trying to add/remove meta-data components in eclipse.

Many thanks in advance.

 

"Exception happened when resolving components type(s), so no component will be added to package manifest editor for types.

* SamlSsoConfig 

See log for detail exception messages."

 

in the log file I can see:

 

!ENTRY com.salesforce.ide.core 2 0 2013-10-26 19:56:14.860

!MESSAGE WARN [2013-10-26 19:56:14,857] (ComponentFactory.java:getComponentBean:1145) - Unable to get component for id 'SamlSsoConfig': Unable to get bean for id 'SamlSsoConfig'


!ENTRY org.eclipse.jface 2 0 2013-10-26 19:56:15.556
!MESSAGE Ignored reentrant call while viewer is busy. This is only logged once per viewer instance, but similar calls will still be ignored.
!STACK 0
java.lang.RuntimeException
at org.eclipse.jface.viewers.ColumnViewer.checkBusy(ColumnViewer.java:763)
at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer.java:530)
at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1465)
at com.salesforce.ide.ui.packagemanifest.PackageManifestTree$5.runInUIThread(PackageManifestTree.java:501)
at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:95)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4144)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:334)
at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:364)
at org.eclipse.jface.dialogs.MessageDialog.openWarning(MessageDialog.java:477)
at com.salesforce.ide.core.internal.utils.Utils.openWarn(Utils.java:378)
at com.salesforce.ide.ui.packagemanifest.PackageManifestController.logAndDisplayWarnMsgIfNeeded(PackageManifestController.java:737)
at com.salesforce.ide.ui.packagemanifest.PackageManifestController.createModel(PackageManifestController.java:858)
at com.salesforce.ide.ui.packagemanifest.PackageManifestController.updateManifest(PackageManifestController.java:171)
at com.salesforce.ide.ui.packagemanifest.PackageManifestController.getEnabledCompTypeTreeNodes(PackageManifestController.java:430)
at com.salesforce.ide.ui.packagemanifest.PackageManifestTree$ManifestContentProvider.getElements(PackageManifestTree.java:688)
at org.eclipse.jface.viewers.StructuredViewer.getRawChildren(StructuredViewer.java:1010)
at org.eclipse.jface.viewers.ColumnViewer.getRawChildren(ColumnViewer.java:703)
at org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren(AbstractTreeViewer.java:1351)
at org.eclipse.jface.viewers.TreeViewer.getRawChildren(TreeViewer.java:391)
at org.eclipse.jface.viewers.StructuredViewer.getFilteredChildren(StructuredViewer.java:917)
at org.eclipse.jface.viewers.AbstractTreeViewer.getSortedChildren(AbstractTreeViewer.java:620)
at org.eclipse.jface.viewers.AbstractTreeViewer$1.run(AbstractTreeViewer.java:820)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:797)
at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:644)
at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:768)
at org.eclipse.jface.viewers.AbstractTreeViewer.internalInitializeTree(AbstractTreeViewer.java:1548)
at org.eclipse.jface.viewers.TreeViewer.internalInitializeTree(TreeViewer.java:833)
at org.eclipse.jface.viewers.AbstractTreeViewer$5.run(AbstractTreeViewer.java:1532)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1443)
at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:403)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1404)
at org.eclipse.jface.viewers.CheckboxTreeViewer.preservingSelection(CheckboxTreeViewer.java:416)
at com.salesforce.ide.ui.packagemanifest.PackageManifestTree$PackageManifestTreeViewer.preservingSelection(PackageManifestTree.java:418)
at org.eclipse.jface.viewers.AbstractTreeViewer.inputChanged(AbstractTreeViewer.java:1525)
at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:280)
at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1690)
at com.salesforce.ide.ui.packagemanifest.PackageManifestTree.updateTree(PackageManifestTree.java:1684)
at com.salesforce.ide.ui.wizards.project.ProjectCustomComponentsComposite.initialize(ProjectCustomComponentsComposite.java:107)
at com.salesforce.ide.ui.wizards.project.ProjectCustomComponentsComposite.<init>(ProjectCustomComponentsComposite.java:64)
at com.salesforce.ide.ui.wizards.project.ProjectCustomComponentsDialog.createDialogArea(ProjectCustomComponentsDialog.java:54)
at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:760)
at org.eclipse.jface.window.Window.create(Window.java:431)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
at com.salesforce.ide.ui.wizards.project.ProjectCustomComponentsDialog.create(ProjectCustomComponentsDialog.java:153)
at org.eclipse.jface.window.Window.open(Window.java:790)
at com.salesforce.ide.ui.wizards.project.ProjectProjectContentComposite$9.widgetDefaultSelected(ProjectProjectContentComposite.java:294)
at com.salesforce.ide.ui.wizards.project.ProjectProjectContentComposite$9.widgetSelected(ProjectProjectContentComposite.java:308)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at com.salesforce.ide.ui.actions.OpenProjectContentPropertiesAction.execute(OpenProjectContentPropertiesAction.java:29)
at com.salesforce.ide.ui.actions.BaseAction.run(BaseAction.java:197)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)

 

Hi Guys,

I like to be able to write a SOQL query which is equivalent to SQL query below:

 

UPDATE

                A

SET

                A.col1 = B.col1

FROM

                TABLEA A

JOIN

                TABLE B

ON

                A.col2 = B.col2

                AND

                A.col3 = B.col3

 

So basically, I like to update table A using a some columns from table B where the join condition between the two tables satisfy. I know that one possible workaround is by looping through all rows from table B and testing for matching condition and then looping and setting values then updating the whole lot as below.

The problem with this approach is that I hit the governor limit very quickly (I have +500 rows in table A and +12,000 rows in table B). I am hoping that there is an alternative workaround for this to avoid the limits.

 

for (SObject1 tempA:A)

{

LIST<SObject2> LB = [SELECT

col1, col2,col3

FROM B

WHERE col2 =: tempA.col2 AND col3 = tempA.col3 ];

 

// NOW LOOP THROUGH THE SELECTED OBJECTS AND SET THE CORRECT VALUS

for (SObject2 tempB: LB)

{
tempB.col1 = tempA.SurchargeRate;
}

// NOW WE CAN UPDATE THE WHOLE LOT

update LB;

}

Hi,

New to SF. Need to pass the selected value from a dropdown list to filter a datatable based on the user selection.

 

<apex:inputField label="Rate Type" id="RateTypeFilter" value="{!GRA_Request_Line__c.Rate_Type__c}"   > <apex:actionSupport action="{!getProductList}" event="onchange"   />    

<apex:param name="filteredText " value="{!RateTypeFilter.value}" />

</apex:inputField>

 

this is where my code is complaining about. How do I reference a controller within VF page?

 

thanks,

Shane

Hello people,


I'm new to SF. As a business requirement I have written a web-service which is used to populate the fields of a custom object. 

I achieved this by embedding parameters in the URL as explained here.

 

The trouble is that SF does not support getting the field IDs dynamically at run time. There is support for custom objects though like below:

 

String pageId  = Schema.getGlobalDescribe().get('Customer_setup_form__c').getDescribe().getKeyPrefix();

 

But I was hoping that you could do something similar for custom fields too.

As a result I had to hardcode the ID of the custom fields which I’m passing in the values for: e.g.

 

https://cs4.salesforce.com/a1G/e?00NP0000000X7dg=France&00NP0000000X7ds=15+rue+de+l%27Hotel+de+Ville++

 

 

This works fine on the test sandbox. I now need to deploy this to our production server and therefore need to write unit test classes. I know for a fact that the ID of these custom controls will change once deployed to a different server. I have therefore 2 questions:

 

1)     Is there a better way of NOT hard-coding these IDs and use Apex to dynamically retrieve them at run time?

2)     The unit test will be my first one to write and I need to know if it will work with these hard-coded IDs?

 

 Many thanks,

Shane

 

Hi guys,

I'm kinda new to SalesForce. I hope someone out there has the answer to this question....

 

I have written a .NET webservice on one of our servers. When I deploy the webservice on a HTTP socket I can call it from SF with no problems. However, when trying to call the same server this time deployed on a HTTPS I get the following error:

 

EXCEPTION_THROWN|[25]|System.CalloutException: IO Exception: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

 

I have checked and the certifacte is valid till next year. It is issued by COMODO - CA. 

 

Any helps appreciated.

 

Many thanks

Hi,

While working on Mobile SDK modules, I created couple of connected apps, I mistakenly blocked "Trailhead Project" connected app instead of "Trailhead Test" and as a result got my playful-goat developer sandbox disconnected from trailhead. As I don't have any other logins to this sandbox, anyone knows how to restore the connection? How can I get support team to re-establish it for me? I don't want to create a new account as all my Trailhead points are already against this blocked user. Thanks in advance!

Hi all,

 

Has anyone else come across this issue? and if yes, how did you go about resolving it?

 

It happens when I'm trying to add/remove meta-data components in eclipse.

Many thanks in advance.

 

"Exception happened when resolving components type(s), so no component will be added to package manifest editor for types.

* SamlSsoConfig 

See log for detail exception messages."

 

in the log file I can see:

 

!ENTRY com.salesforce.ide.core 2 0 2013-10-26 19:56:14.860

!MESSAGE WARN [2013-10-26 19:56:14,857] (ComponentFactory.java:getComponentBean:1145) - Unable to get component for id 'SamlSsoConfig': Unable to get bean for id 'SamlSsoConfig'


!ENTRY org.eclipse.jface 2 0 2013-10-26 19:56:15.556
!MESSAGE Ignored reentrant call while viewer is busy. This is only logged once per viewer instance, but similar calls will still be ignored.
!STACK 0
java.lang.RuntimeException
at org.eclipse.jface.viewers.ColumnViewer.checkBusy(ColumnViewer.java:763)
at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer.java:530)
at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1465)
at com.salesforce.ide.ui.packagemanifest.PackageManifestTree$5.runInUIThread(PackageManifestTree.java:501)
at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:95)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4144)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:334)
at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:364)
at org.eclipse.jface.dialogs.MessageDialog.openWarning(MessageDialog.java:477)
at com.salesforce.ide.core.internal.utils.Utils.openWarn(Utils.java:378)
at com.salesforce.ide.ui.packagemanifest.PackageManifestController.logAndDisplayWarnMsgIfNeeded(PackageManifestController.java:737)
at com.salesforce.ide.ui.packagemanifest.PackageManifestController.createModel(PackageManifestController.java:858)
at com.salesforce.ide.ui.packagemanifest.PackageManifestController.updateManifest(PackageManifestController.java:171)
at com.salesforce.ide.ui.packagemanifest.PackageManifestController.getEnabledCompTypeTreeNodes(PackageManifestController.java:430)
at com.salesforce.ide.ui.packagemanifest.PackageManifestTree$ManifestContentProvider.getElements(PackageManifestTree.java:688)
at org.eclipse.jface.viewers.StructuredViewer.getRawChildren(StructuredViewer.java:1010)
at org.eclipse.jface.viewers.ColumnViewer.getRawChildren(ColumnViewer.java:703)
at org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren(AbstractTreeViewer.java:1351)
at org.eclipse.jface.viewers.TreeViewer.getRawChildren(TreeViewer.java:391)
at org.eclipse.jface.viewers.StructuredViewer.getFilteredChildren(StructuredViewer.java:917)
at org.eclipse.jface.viewers.AbstractTreeViewer.getSortedChildren(AbstractTreeViewer.java:620)
at org.eclipse.jface.viewers.AbstractTreeViewer$1.run(AbstractTreeViewer.java:820)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:797)
at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:644)
at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:768)
at org.eclipse.jface.viewers.AbstractTreeViewer.internalInitializeTree(AbstractTreeViewer.java:1548)
at org.eclipse.jface.viewers.TreeViewer.internalInitializeTree(TreeViewer.java:833)
at org.eclipse.jface.viewers.AbstractTreeViewer$5.run(AbstractTreeViewer.java:1532)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1443)
at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:403)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1404)
at org.eclipse.jface.viewers.CheckboxTreeViewer.preservingSelection(CheckboxTreeViewer.java:416)
at com.salesforce.ide.ui.packagemanifest.PackageManifestTree$PackageManifestTreeViewer.preservingSelection(PackageManifestTree.java:418)
at org.eclipse.jface.viewers.AbstractTreeViewer.inputChanged(AbstractTreeViewer.java:1525)
at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:280)
at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1690)
at com.salesforce.ide.ui.packagemanifest.PackageManifestTree.updateTree(PackageManifestTree.java:1684)
at com.salesforce.ide.ui.wizards.project.ProjectCustomComponentsComposite.initialize(ProjectCustomComponentsComposite.java:107)
at com.salesforce.ide.ui.wizards.project.ProjectCustomComponentsComposite.<init>(ProjectCustomComponentsComposite.java:64)
at com.salesforce.ide.ui.wizards.project.ProjectCustomComponentsDialog.createDialogArea(ProjectCustomComponentsDialog.java:54)
at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:760)
at org.eclipse.jface.window.Window.create(Window.java:431)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
at com.salesforce.ide.ui.wizards.project.ProjectCustomComponentsDialog.create(ProjectCustomComponentsDialog.java:153)
at org.eclipse.jface.window.Window.open(Window.java:790)
at com.salesforce.ide.ui.wizards.project.ProjectProjectContentComposite$9.widgetDefaultSelected(ProjectProjectContentComposite.java:294)
at com.salesforce.ide.ui.wizards.project.ProjectProjectContentComposite$9.widgetSelected(ProjectProjectContentComposite.java:308)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at com.salesforce.ide.ui.actions.OpenProjectContentPropertiesAction.execute(OpenProjectContentPropertiesAction.java:29)
at com.salesforce.ide.ui.actions.BaseAction.run(BaseAction.java:197)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)

 

Hi Guys,

I like to be able to write a SOQL query which is equivalent to SQL query below:

 

UPDATE

                A

SET

                A.col1 = B.col1

FROM

                TABLEA A

JOIN

                TABLE B

ON

                A.col2 = B.col2

                AND

                A.col3 = B.col3

 

So basically, I like to update table A using a some columns from table B where the join condition between the two tables satisfy. I know that one possible workaround is by looping through all rows from table B and testing for matching condition and then looping and setting values then updating the whole lot as below.

The problem with this approach is that I hit the governor limit very quickly (I have +500 rows in table A and +12,000 rows in table B). I am hoping that there is an alternative workaround for this to avoid the limits.

 

for (SObject1 tempA:A)

{

LIST<SObject2> LB = [SELECT

col1, col2,col3

FROM B

WHERE col2 =: tempA.col2 AND col3 = tempA.col3 ];

 

// NOW LOOP THROUGH THE SELECTED OBJECTS AND SET THE CORRECT VALUS

for (SObject2 tempB: LB)

{
tempB.col1 = tempA.SurchargeRate;
}

// NOW WE CAN UPDATE THE WHOLE LOT

update LB;

}

Is there any way to mass delete records in a custom object (table)?  The Mass Delete feature under Setup -> Administration Setup -> Data Management -> Mass Delete Records  only seems to perform a mass delete for SDFC standard objects....

 

It is pretty painful to delete records one by one - phew!!

 

 

  • December 21, 2009
  • Like
  • 0