-
ChatterFeed
-
1Best Answers
-
1Likes Received
-
1Likes Given
-
16Questions
-
42Replies
Save error: Comparison arguments must be compatible types: Schema.SObjectField, String
I'm getting the topic title's error on my trigger logic - I'm just trying to filter out fields where the Month field is "Totals" before passing trigger.new to my class.
trigger ClientAnalyticsAfterInsertUpdateMonth on Client_Analytics__c (after insert, after update) { private ClientAnalyticsAfterUpdate caau; if(Client_Analytics__c.Month__c == 'Totals'){ if (trigger.isAfter) { if (trigger.isUpdate || trigger.isInsert) { caau = new ClientAnalyticsAfterUpdate(trigger.new); } } } }
- DJP1S
- August 22, 2012
- Like
- 0
- Continue reading or reply
no selection checkbox in enhanced list for community users
we use the component 'apex:enhandedlist', which shows a selection checkbox on each line in the VisualForce page. However, community users do not see that checkbox. I have granted the community users all relevant permissions, but still no luck.
Any suggestions?
Marco
- marcob
- November 07, 2016
- Like
- 0
- Continue reading or reply
Spring '14 problem: custom button causes logout in sandbox
this week i have refreshed my sandbox. The sandbox is on CS17, which has been upgraded to Spring '14 last week. The production org is on EU2, which is still on Winter '14.
Now, in my sandbox, users are kicked out (redirected to the login page) after a few clicks. Support told me that a custom button is causing the problem, won't get more hints because i don't have premium support (i'm just a poor developer :))
I have the strong feeling that Spring '14 is somehow part of the cause.
Anyone?
Marco
- marcob
- April 10, 2014
- Like
- 0
- Continue reading or reply
import tab delimited files with dataloader
With Dataloader v25 is was able to import tab delimited files. Now, with v29 that doesn't work anymore, seems like it only takes comma delimited files. Anybody got the same experience?
Marco
- marcob
- February 19, 2014
- Like
- 1
- Continue reading or reply
call Database.executeBatch from @future method allowed?
Hi,
although i've studied the documentation, i can't find the answer to my question: is it allowed to call a batch class from an @future method? Maybe i can't find it because it is simply allowed, but need to be sure, for my entire design is depending on it.
Hope for some respons!
Br, Marco
- marcob
- April 05, 2013
- Like
- 0
- Continue reading or reply
old problem with rendering VF page as Excel returned suddenly in all our pages
Hi,
since a few weeks, we have a problem when we render a VF page as Excel. This code appears in the first cel in the Excel file:
function twistSection(twisty, sectionId) { var parentDiv = twisty; while (parentDiv.tagName != 'DIV') { parentDiv = parentDiv.parentNode; } var div = parentDiv.nextSibling; var elemWasOn = false; if (div.style.display != 'none') { div.style.display = 'none'; twisty.className ='showListButton'; ................
When using Excel for the Mac, it adds even extra code:
if(!window.sfdcPage){window.sfdcPage = new ApexPage();} UserContext.initialize({"networkId":"","locale":"nl_NL","labelLastModified":"1356556072000","isDefaultNetwork":true,"today":"4-1-2013 12:28","timeFormat":"H:mm","userPreferences":[{"index":112,"name":"HideInlineEditSplash","value":false},.....................
We used to have this problem 2 years ago, but we solved it, see this post:
Now the problem suddenly returned, and we have no clue what causes it. And it is not only on 1 page, all our pages that are rendered as Excel (about 10 of them) have the exact same problem.
Anybody?
- marcob
- January 04, 2013
- Like
- 0
- Continue reading or reply
search filter on master object
Hi,
in a search dialogue (pop up window), i only want to search on records that have a specific master-id.
I.e. i have employers, and each employer has multiple employees. When i have selected an employer on my VF page, and the user wants to search for an employee, he must search within that employer, so he cannot find employees that have a different employer as parent.
Thus,employee has a master-detail relationship with employer.
Is this achievable without doing anything in my VF page/controller?
Anyone?
Marco
- marcob
- September 14, 2012
- Like
- 0
- Continue reading or reply
test fails dus to missing approval process definition in patch org
Hi,
when running a test class in a patch org, i get errors due to the fact that i haven't set up an approval process definition. Since this is a patch org, i don't want to have to set up a process definition every time we open up a new patch org.
Any suggestions how to deal with this? I know we can't create a process definition in apex, that would have been simple..
Thx in advance!
Marco
- marcob
- August 22, 2012
- Like
- 0
- Continue reading or reply
what is the best apex code?
Hi,
what is better:
string querystring = 'select id, field_a, field_b from <custom object> where id =: <variable>';
Alternative 1:
for(<custom object> co :database.query(selectie)){
myList.add(co);
}
Alternative 2:
myList = database.query(selectie);
Any suggestions?
Thx in advance!
Marco
- marcob
- August 01, 2012
- Like
- 0
- Continue reading or reply
DataLoader version 25
Hi,
today we've tried to configure a batch DataLoader process. It failed to pick up the config file, no matter how we tried. Is this a know issue with version 25? We installed 22 and 23 on the same environment, with exactly the same config (copied the one we build earlier today for version 25), and it worked fine.
Thanx in advance!
Marco
- marcob
- July 18, 2012
- Like
- 0
- Continue reading or reply
call Batch from Batch execute method
Hi,
is it possible to call a Batch Apex from an execute method of another Batch Apex? I've read in another post that it won't work from a finish method, but maybe it might work from an execute method?
Thx!
Marco
- marcob
- July 13, 2012
- Like
- 0
- Continue reading or reply
workflow for Portal users
Hi,
i'm very curious if it is possible to involve portal users in a workflow process. I can't select user with a 'Customer Portal Manager Custom' profile as an approval user, it seems a portal user is only allowed to make an initial request. Is there any way to have portal users approve requests, or cancel/withdraw an approval request? Maybe in apex?
Many thanks in advance!
Marco
- marcob
- July 10, 2012
- Like
- 0
- Continue reading or reply
PermissionsModifyAllData
Hi,
Is there a way to use the PermissionsModifyAllData field from the Profile object in Apex? I can see in the schema that it is included in the Profile object. However, when i try to use that field, it says that the field name is incorrect, check spelling. It appears to me that all the Permission-fields in the profile don't have the name the schema tells me.
Any suggestions?
Thanks in advance!
Br, Marco
- marcob
- May 23, 2012
- Like
- 0
- Continue reading or reply
skip approval step in workflow when approver is member of a specific group
Hi guys,
i am working on an approval process for leave requests. When an employee requests a day off, it has to be approved by the manager. But in some cases, the central HR department enters the leave request, and it those cases it should automatically get approved (or better: not go into the approval process).
My solution is to check whether the record maker is member of a certain public group, for instance 'group central HR admin'. But i cannot define that in the approval process.
Any suggetions? Am i on the wrong track here?
Thx!
Marco
- marcob
- May 03, 2012
- Like
- 0
- Continue reading or reply
multiple roles for one user
Hi,
is there a way to assign more than one role to a specific user? It seems that whenever i assign a role to a user, it overwrites the previous assigned role.
Any suggestions, or is it simply not possible?
Thx in advance! Marco.
- marcob
- April 07, 2012
- Like
- 0
- Continue reading or reply
put code in trigger, class or ???
Hi,
i have a piece of business logic, but don't know where to put it. It concerns the recalculation of leave entitlements.
If i put it in a trigger, it won't be available for me to use in a screen. For instance if i want to create a button 'recalculate leave entitlements' on a Visual Force page.
It seems to me that i have to put it in a separate class. This way i can call it from a trigger, and also from a Visual Force page (via the controller/extension).
But i also want to make sure leave entitlements are recalculated whenever i import data from for instance an Excel sheet.
What is my best option here?
Please advice.
Many thanks in advance!
- marcob
- April 03, 2012
- Like
- 0
- Continue reading or reply
copy entire development org?
Hi, i'm a sf newbie, just joined an existing development environment. I am about to start my first assignment, which is changing an existing module. This will take at least a couple of weeks to finish, but in the mean time our app is being packages every week (sometimes even more frequently). Is there a way to copy the entire environment, so i can paly around a little bit before i really start changing the existing code in the development org?
Many thanks in advance!
Br, Marco
- marcob
- March 07, 2012
- Like
- 0
- Continue reading or reply
import tab delimited files with dataloader
With Dataloader v25 is was able to import tab delimited files. Now, with v29 that doesn't work anymore, seems like it only takes comma delimited files. Anybody got the same experience?
Marco
- marcob
- February 19, 2014
- Like
- 1
- Continue reading or reply
no selection checkbox in enhanced list for community users
we use the component 'apex:enhandedlist', which shows a selection checkbox on each line in the VisualForce page. However, community users do not see that checkbox. I have granted the community users all relevant permissions, but still no luck.
Any suggestions?
Marco
- marcob
- November 07, 2016
- Like
- 0
- Continue reading or reply
Display approver names when assigned to a Queue
I have built an Approval process on a custom Object and defined a queue as an approver. When the record mets Approval Criteria It is showing Queue name in Approval history not Individual approvers. Is there any way to display approver names in the queue in approval history or users to know with whom in the queue the request is waiting for approval.
Regards
Krishna
- hk7965
- April 28, 2014
- Like
- 1
- Continue reading or reply
Spring '14 problem: custom button causes logout in sandbox
this week i have refreshed my sandbox. The sandbox is on CS17, which has been upgraded to Spring '14 last week. The production org is on EU2, which is still on Winter '14.
Now, in my sandbox, users are kicked out (redirected to the login page) after a few clicks. Support told me that a custom button is causing the problem, won't get more hints because i don't have premium support (i'm just a poor developer :))
I have the strong feeling that Spring '14 is somehow part of the cause.
Anyone?
Marco
- marcob
- April 10, 2014
- Like
- 0
- Continue reading or reply
Master detail is not updating with import wizard.
Hi,
I have a custom object which contains a master detail relationship.
When I try to update records using import wizard the records are not updating ,showing 0 records updated though i used 1 digit id to update this..
Plz clarify me the below queris.
1)can we update master detail relationship with import wizard.
2)What is the main difference between import wizard and data loader other than number of records they handle.
3)what i sthe diff between Data Import WizardBETA and Import Custom Objects under Data Management.
Thanks,
Naveen
- NaveenReddy
- December 08, 2013
- Like
- 0
- Continue reading or reply
Query for Id of a Custom Field
Is it possible to do a SOQL query that allows me to obtain the SF Id of a master-detail custom field I have in a custom object? I'm not wanting the ID for a record in the object I want the Id for the actual field. Field API name is Opportunity__c in a custom object with an API name of Win_Form__c.
- Jeff Bloomer
- April 05, 2013
- Like
- 1
- Continue reading or reply
call Database.executeBatch from @future method allowed?
Hi,
although i've studied the documentation, i can't find the answer to my question: is it allowed to call a batch class from an @future method? Maybe i can't find it because it is simply allowed, but need to be sure, for my entire design is depending on it.
Hope for some respons!
Br, Marco
- marcob
- April 05, 2013
- Like
- 0
- Continue reading or reply
Using webservice method to Import large data
HI all,
I have to insert Account,contact and Opportunity records coming from .net server as a xml string.i have created a webservice method and getting that xml as string and then parsing the xml.
I am able to it,but before inserting i have to check if those account,contact n Opp. is existing in salesfore or not.If not,then insert.I have done every thing and also achieve my goal.
But my code is working for small set of data , that is coming from extenal server.Currently i am sending 30-30 information in xml to sfdc and its working,but more than 30 records at a time causing prblm,giving
error System.LimitException: Too many SOQL queries: 101
bcs i m using SOQL for checking the existing Account,contact and Opportunity.
Error like
System.LimitException: Too many DML statements : 151
System.LimitException: Too many code statements: 200001
Also occuring for more than 30 as i m also inserting Account,contact and Opportunity if it is not existing,
If u know any other way to do this pls share the idea,cause i have to import large data at a time from external server.
Thanx in adv
- Amritesh Singh
- April 05, 2013
- Like
- 0
- Continue reading or reply
displaying the data in vf page
Hi,
I have one requirement.
How display the data on visualforce page based on the dates between.i,e startdate and enddates are two custom fields.
depends on this values i need to display the remaining fields.
Thanks
siva
- nallurisivashankar
- April 05, 2013
- Like
- 0
- Continue reading or reply
Aggregate query has too many rows for direct assignment, use FOR loop
Hi ,
i wrote a query which has an inner query in it to get the child records.
i will give an example with standard objects
Account acc = [select name,(select firtsname,lastname from Contact) from account limit 1];
i am using this "acc" varibale in VF page to display the contact records.
<apex:page>
<apex:repeat value="{!acc.contacts}" var="contact" >
<apex:outputtext value="{!contact.firstname}"/>
<apex:outputtext value="{!contact.lastname}"/>
</apex:repeat>
i have around 130 contacts, but iam getting below error message when i try to open the VF page to view the results.
"Aggregate query has too many rows for direct assignment, use FOR loop "
please let me know if anyone faced this issue earlier. what is the limit of number of rows in aggregate query.
is ithis is the correct way to get this done.
actually in my query there are around 15 inner object queries. that is my parent object has 15 childs.
any help would be appreciated
thanks in advance
Regards,
Rakesh
- Rakesh E
- April 05, 2013
- Like
- 0
- Continue reading or reply
Indexed fields Purpose?
Hi
what are the Indexed fields in salesforce.
Which sittuation we are using INDEXED fields.
Can you explain with a small example.
Regards.
- new_bie
- March 07, 2013
- Like
- 0
- Continue reading or reply
search filter on master object
Hi,
in a search dialogue (pop up window), i only want to search on records that have a specific master-id.
I.e. i have employers, and each employer has multiple employees. When i have selected an employer on my VF page, and the user wants to search for an employee, he must search within that employer, so he cannot find employees that have a different employer as parent.
Thus,employee has a master-detail relationship with employer.
Is this achievable without doing anything in my VF page/controller?
Anyone?
Marco
- marcob
- September 14, 2012
- Like
- 0
- Continue reading or reply
In pageBlockButtons, <apex:facet> only works with top set of buttons
I have functionality in a form so when the users click on the button, the button goes disabled. The only problem I have is that in a <apex:pageBlockButtons> block, where two sets of buttons are created, only the top set of buttons becomes disabled. This was put into place to prevent the users from double-clicking the buttons, however they end up double-clicking the lower set of buttons because those buttons do not become disabled.
<apex:pageBlockButtons id="productButtons">
<apex:actionStatus rendered="{!NOT(readOnly)}" id="applyButtonStatus">
<apex:facet name="stop">
<apex:commandButton id="applyButtonActive" action="{!calcRevenue}" value="Apply Changes/Calculate Revenue" status="applyButtonStatus" disabled="false" rerender="productTypeSelectionBlock"/>
</apex:facet>
<apex:facet name="start">
<apex:commandButton id="applyButtonDisabled" action="{!calcRevenue}" value="Applying Changes..." status="applyButtonStatus" disabled="true" rerender="productTypeSelectionBlock"/>
</apex:facet>
</apex:actionStatus>
</apex:pageBlockButtons>
Is there any way to get this to work inside of the pageBlockButtons block, or do I just have to create two sets of buttons? If I create two sets, then they'll disable independently of each other, which isn't ideal.
- dcarmen66
- March 20, 2012
- Like
- 0
- Continue reading or reply
How to assign multiple approver to the approval process through apex code?
I am trying this code to assign multiple approvers to an existing approval process
Approval.ProcessSubmitRequest req1 = new Approval.ProcessSubmitRequest();req1.
setComments('Submitting request for approval.');
req1.setObjectId(theId);
req1.setNextApproverIds(new Id[] {'00590000000OYw5', '00590000000OYw5'});
Approval.ProcessResult result = Approval.process(req1);
but its giving exception that the required field missing at line
Approval.ProcessResult result = Approval.process(req1);
Please help me out. How to assign multiple User ids as approvers to the approval process but only through apex code
Thanks
- atulit27
- June 28, 2011
- Like
- 0
- Continue reading or reply
Parallel Approval
approval from all selected approvers" or "Approve or reject based on the FIRST response" for the "Automatically assign Approvers" option when multiple approvers are selected.
I have couple of questions. Why are these options not available for the "Let the submitter choose the approver manually" and "Automatically assign to queue", becuase both are supporting multiple approvers?
The scenario is I want the user to choose a sub-set of users from a Queue while submitting for approval and also specify whether approval requires approval from all or any user in the subset.
Is this possible programmatically (via Salesforce API)?
Thanks,
Vel.
- Vel
- August 06, 2009
- Like
- 0
- Continue reading or reply
Rerender not working when using Lightning Design System SVG icons
The way our controller works is that we have a pageblocktable that shows certain records from today on. At the top of the page we have a checkbox that changes the list to also show the history of all records. The Checkbox has an extra icon next to it as followed:
<svg aria-hidden="true" class="slds-icon slds-icon-standard-contact slds-icon--small"> <use xlink:href="{!URLFOR($Resource.slds100, 'icons/standard-sprite/svg/symbols.svg#user')}"></use> </svg>The checkbox has the following code:
<apex:outputlabel value="Historie" for="historyselect" /> <apex:inputcheckbox value="{!historySelect}" id="historyselect"> <apex:actionsupport event="onchange" rerender="theForm" status="spinner" action="{!refresh}" /> </apex:inputcheckbox>When not using the SVG icon, the page is rerendered and the list is updated to include all the items. But the moment I place an SVG icon it will stop working. Somehow the onstart is being started, but the oncompleted is never finished. The page also does not rerender. It seems to be related to the following reported bug on the LDS github:
https://github.com/salesforce-ux/design-system/issues/47
But I cant seem to find the reported bug on the Known Issues page. Does anyone have a solution or a workaround?
Greetings,
Ron
- R.Planken
- June 08, 2016
- Like
- 3
- Continue reading or reply