• jnegi
  • NEWBIE
  • 10 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 15
    Replies
Hi Devs,

I am receiving "Duplicate id in list" error in the below line and I know "requests" has duplicate ids, isn't it supposed to store success or error in "upserRslt"?

Database.UpsertResult [] upserRslt = Database.upsert(requests, externalIdField, false);

Partial success is not working even with Database.upsert(false) parameter, I am using the above code in the Queueable class, has anyone faced this issue?

Thanks!

 
  • February 04, 2022
  • Like
  • 0
Hi All,

I am using lighning component in VF page using lightning out. Created simple datatable with Edit and Del option for each record. Now when I click on Edit link on each row, able to pass selected record Id to controller however not able to use below event code to edit the record. Getting undefined in console.log.
 
var editRecordEvent = $A.get("e.force:editRecord");    
console.log('***JN***'+editRecordEvent);
    editRecordEvent.setParams({
         "recordId": recId // recId is populating correctly
   });
    editRecordEvent.fire();

Any idea?

Thanks
Jagmohan
  • March 16, 2018
  • Like
  • 0
Hi All,

We are overriding Opportunity tab with custom tab..so need to override "Create New View" functionality as well. Now when the user click on "Add Filter Logic " link to provide custom filter logic in the text box I am saving this text into custom field on custom object. By default if 5 rows are there then in the text box I am showing  "1 AND 2 AND 3 AND 4 AND 5"

Now user can modify this filter logic like below 
Possible combination could be:

1 AND 2 OR (3 AND 4 AND 5) -     correct 
(1 OR 2) AND (3 OR 4 OR 5)   -     correct
(1 OR 2)(3 4) -                                Incorrect
(1 OR (2 OR 3 AND 4 AND 5)  -     Incorrect

Any help on validating this custom logic before saving it to custom field would be appriciated?

Thanks !
  • June 30, 2016
  • Like
  • 0

I am able to consume Salesforce service in Web Application in .Net environment and also able to make the login call. However, when making the login call in Silverlight application I am getting below error message:

"An error occurred while trying to make a request to URI 'https://test.salesforce.com/services/Soap/c/27.0/0DFE0000000TXcQ'.
This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without  using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details."

Also, went through below link which describe that we need to publish below xml in Salesforce to make it work, any idea?

ClientAccessPolicy.xml
OR
CrossDomain.xml

https://success.salesforce.com/ideaView?id=08730000000h1zbAAA

Kindly let me know if I am missing something?

Thanks,
Jagmohan

  • May 10, 2013
  • Like
  • 0

Hi All,

 

I am creating a visualforce page "renderAsPdf" and using custom component to render the body of the PDF. Since the body is rendering at run time so it might take 2 to 3 pages. Now my question is:

 

  • How can I show Header and Footer in each page of the pdf?
  • How can I show Footer at the bottom of the last page rather than middel of the page where the body ends.

Thanks in advance!

  • June 05, 2012
  • Like
  • 0

Is there any way by which we can customize the email address which we get by creating the email address from the email service in Salesforce?

Ex:
From:
Current email address: emailservice@Xsddf3456232323232323232.m.apex.sandbox.salesforce.com

To :

support@mydomain.com


Thanks.
Jagmohan

  • April 18, 2012
  • Like
  • 0

Hi All,

I am trying to refresh the parent window with the click of a button, which is on pop-up window, with the help of below code:
VF code:-

<script>
if("{!$Request.success}" == "true") {
parent.window.close();
parent.window.opener.location.href = "/{!$Request.id}";
}
</script>

Controller:-
PageReference curPage = ApexPages.currentPage();
curPage.getParameters().put('success','true');
curPage.getParameters().put('id',Apexpages.currentPage().getParameters().get('id'));
curPage.setRedirect(true);
return curPage;

 

This code is working fine in Chrome and Mozilla. However, in IE8, when I click on the button, it is opening a new window
rather than refreshing the parent window.

 

Any suggestion would be appreciated.

  • January 21, 2012
  • Like
  • 0

Hi All,

 

I want to get  QueueSObject record prefix . I can get Other standard objects prefix by using below mentioned code:

 

Account.sObjectType.getDescribe().getKeyPrefix();

 

but when I use QueueSobject in above code it through an error. :

 

"Method does not exist or incorrect signature: [Schema.DescribeFieldResult].getKeyPrefix();"

 

any Idea ?

 


  • January 23, 2011
  • Like
  • 0

Hi All

 

Maximum amount of code used by all Apex scripts in an organization is 2 MB. Is it possible to extend this limit?

  • January 21, 2011
  • Like
  • 0

We need to integrate oracle with salesforce.com. But we are getting an error regarding the external ID: 
ID value of incorrect type.

 

Any Suggestion ?

  • December 06, 2010
  • Like
  • 0

Hi All

 

During integration we are inserting record in opportunity object into salesforce. We are getting an error on a field which is encrypted. So I want to ask can we insert values in Encrypted field in salesforce using API.

 

Any suggestion ?

  • December 03, 2010
  • Like
  • 0

Hi All

I am using partner api to insert rows into salesforce. Can anyone provide the sample code for this.

 

Thanks in advance !

  • November 16, 2010
  • Like
  • 0

Hi 

 

As per my business requirement I am deleting my CampaignMember's record and creating new record. Now how can I set the same FirstRespondedDate in new records which were in deleted records.  

  • November 13, 2010
  • Like
  • 0

Hi

I want to ask does Winter '11 removed time limits on Web Service callouts from Apex.

Please let me know the time limit in either case.


Thanks in advance.

 

  • October 27, 2010
  • Like
  • 0

I have created a checkbox on child object Case1 with name MyCheckbox, now I am creating a Roll-Up summery field on parent object i.e. Account with the same name MyCheckbox. the problum is when I am creating Roll-Up summery field on Acount and putting the Filter Criteria i.e. MyCheckbox equals TRUE, and when I am saving it, I am getting an error saying

 "There were custom validation error(s) encountered while saving the affected record(s). 
The first validation error encountered was "Formula cannot use another formula field
that directly or indirectly refers to itself. Case1__c.MyCheckbox__c -> Case1__c.MyCheckbox__c".


Changing the Roll-up summery field name is the workaround,but I want to know the reason behind it.


Please let me know does any one have any idea about it.

 

Thanks in advance.

  • October 26, 2010
  • Like
  • 0
Hi Devs,

I am receiving "Duplicate id in list" error in the below line and I know "requests" has duplicate ids, isn't it supposed to store success or error in "upserRslt"?

Database.UpsertResult [] upserRslt = Database.upsert(requests, externalIdField, false);

Partial success is not working even with Database.upsert(false) parameter, I am using the above code in the Queueable class, has anyone faced this issue?

Thanks!

 
  • February 04, 2022
  • Like
  • 0
Hi All,

I am using lighning component in VF page using lightning out. Created simple datatable with Edit and Del option for each record. Now when I click on Edit link on each row, able to pass selected record Id to controller however not able to use below event code to edit the record. Getting undefined in console.log.
 
var editRecordEvent = $A.get("e.force:editRecord");    
console.log('***JN***'+editRecordEvent);
    editRecordEvent.setParams({
         "recordId": recId // recId is populating correctly
   });
    editRecordEvent.fire();

Any idea?

Thanks
Jagmohan
  • March 16, 2018
  • Like
  • 0

Hello All

 

Child Object : C, with one date field DF1.

When DF1 passes Today (i.e no longer => Today), it should update master object fields.

 

The trigger is not catching this. How should i go about this?

One possible solution is to schedule a batch to run every day, but not sure if thats the best solution.

 

Any help will be appreciated.

 

Thanks

Sid

 

 

 

can we import all the contacts into salesforce from an LDAP server?

Is there any apex code to pull contacts and addressbook from LDAP server and  push it  to contacts object in salesforce??

I have a requirement to get all the contacts from LDAP server  and  push it in Contacts object in salesforce is it possiable?
 
 

what is the main differnce between this

 

Text

html with letter head

custom without letter head

visualforce

 

 

where we use all please can any one tel me with an exapmle

 

Is there any way by which we can customize the email address which we get by creating the email address from the email service in Salesforce?

Ex:
From:
Current email address: emailservice@Xsddf3456232323232323232.m.apex.sandbox.salesforce.com

To :

support@mydomain.com


Thanks.
Jagmohan

  • April 18, 2012
  • Like
  • 0

Hi All,

I am trying to refresh the parent window with the click of a button, which is on pop-up window, with the help of below code:
VF code:-

<script>
if("{!$Request.success}" == "true") {
parent.window.close();
parent.window.opener.location.href = "/{!$Request.id}";
}
</script>

Controller:-
PageReference curPage = ApexPages.currentPage();
curPage.getParameters().put('success','true');
curPage.getParameters().put('id',Apexpages.currentPage().getParameters().get('id'));
curPage.setRedirect(true);
return curPage;

 

This code is working fine in Chrome and Mozilla. However, in IE8, when I click on the button, it is opening a new window
rather than refreshing the parent window.

 

Any suggestion would be appreciated.

  • January 21, 2012
  • Like
  • 0

I have a custom object "Time_Entry__C" that has a look-up field called "Employee__C" which holds the ID from an Employee object

  - The employee object has ID, Firstname__C; Lastname__C fields.

 

I want to populate the Employee1__c field (in the Time_Entry__C object) with the ID from the Employee object (SFDC_Employee__c) BASED upon the current user (if found).

 

For example.  The current user = "John Doe"  When he creates a record in the Time_Entry__c object, I want a "before insert"  trigger to find the ID in the SFDC_Employee__c object  where SFDC_Employee__c.firstname = UserInfo.firstname and SFDC_Employee__c.lastname = Userinfo.Lastname then plop that Employee ID into the Employee1__c  lookup field on the Time_Entry__c object.

 

Any help?

  • October 31, 2011
  • Like
  • 0

Hi All,

 

I want to get  QueueSObject record prefix . I can get Other standard objects prefix by using below mentioned code:

 

Account.sObjectType.getDescribe().getKeyPrefix();

 

but when I use QueueSobject in above code it through an error. :

 

"Method does not exist or incorrect signature: [Schema.DescribeFieldResult].getKeyPrefix();"

 

any Idea ?

 


  • January 23, 2011
  • Like
  • 0

Hi All

 

Maximum amount of code used by all Apex scripts in an organization is 2 MB. Is it possible to extend this limit?

  • January 21, 2011
  • Like
  • 0

Hi 

 

As per my business requirement I am deleting my CampaignMember's record and creating new record. Now how can I set the same FirstRespondedDate in new records which were in deleted records.  

  • November 13, 2010
  • Like
  • 0

Hi

I want to ask does Winter '11 removed time limits on Web Service callouts from Apex.

Please let me know the time limit in either case.


Thanks in advance.

 

  • October 27, 2010
  • Like
  • 0
Hey Guys,
 
I have a strange one here, I have done some tinkering but sadly I have to run out for the rest of the day so thought I would leave a question up so I might have an answer for this evening and I can finish the project.
 
I have a Visualforce page that in turn loads two other Visualforce pages (long story).  In Firefox all runs perfectly, however, after some cross platform testing can see IE is going to screw me once again!  As soon as the page starts to load IE pops up a message just under the title bar saying:
 
To help protect your security, Internet Explorer blocked this site from downloading files to your computer, Click here for options....
 
Of course none of the options are helpful, trying to download the file is useless as it is the VF page it is trying to download and I’m a bit stumped to be honest.
 
Any ideas would be welcome,