• kabu
  • NEWBIE
  • 50 Points
  • Member since 2013

  • Chatter
    Feed
  • 2
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 23
    Questions
  • 26
    Replies
what is the best approach to REST API and read data chunk by chunk for data in (GB)? I can divide the data with filter  and get the data but looking for any other better suggestions or ideas to make sure the chuck size is always same?  I may hit also governor limit on API. Looking for some guidance.
  • February 25, 2019
  • Like
  • 0
I need to sync data between 2 systems(Oracle/SAP ERP and Salesforce account). Need realtime sync. what is the tool or SOAP/REST should I use to accomplish this?we have 1Mln+ records. Sometimes we mass update the records   and that need to be in sync.
  • February 28, 2018
  • Like
  • 0
I wanted to read stock price Yahoo or any other site like google finance or msn but cant get any sample code. I tried the following sample  and it is not working now.
https://developer.salesforce.com/blogs/developer-relations/2010/02/spring-10-saw-the-general-availability-of-one-of-my-favorite-new-features-of-the-platform-the-apex-schedulerwith-the-apex-s.html

Is there any public url available free to get stock price?
  • December 12, 2017
  • Like
  • 1
How can I setup something  so that the user has access to only child and not parent records? I can use apex to create sharing or config.
Suppose user1 has access to Account and wanted to restrict on contact/oppertunity records. so that these child records are not visible to user1.

User2 has access to contact/opportunity but don't want to provide access Account record.

I am using customobjects  and Master/detail relationship already exists and cant change it. so looking for options.

Please let me know if there is a workaround.
  • October 09, 2017
  • Like
  • 0
Hi I have 2 different custom objects with field values same in both objects and wanted to query matching records. Also wanted to query records from both objects.
in sql I write like this
(SELECT Ord.OrderID__c, Cust.CustomerName__c, Ord.OrderDate__c
FROM Orders__c  Ord
INNER JOIN Customers__c  cust
ON Ord.CustomerID__c=Cust.CustomerID__c)

Please let me know how can I write in soql.

thanks in advance.
  • June 16, 2017
  • Like
  • 0
I am looking for code to escape double quote and backslash.
String val='my "test" \string';
after escape it should display
my "test" \string

thanks in advance.
  • January 31, 2017
  • Like
  • 0
I am trying this query  but getting syntax error:
SELECT Id, IsActive,(Select Id from GroupMembers),
                        (Select Id from PermissionSetAssignments) 
                                                  FROM User
                                          WHERE Isactive=true

What is the relationship name used for permissionsets and groupmembers?

 
  • March 21, 2016
  • Like
  • 0
Getting error when I call get future method from a future or Queable Class fand invoke thro' trigger.

System.VisualforceException: org.apache.commons.httpclient.RedirectException: Maximum redirects (100) exceeded.
Salesforce doc says  we can call pageRef.getcontent() method from a trigger and it is released in Winter 2016.

Is this really fixed or still having issues?
  • January 21, 2016
  • Like
  • 0
Hello,
I am having error "Error Occurred: Guest users are not permitted in internal communities"  when I use site guest user to post message  to chatter thro' process flow.

​How can I fix it? Is it something I am missing permission on chatter for this site guest user?
  • November 04, 2015
  • Like
  • 0
I have account Detail Page custom button and Content Source is visual force page in the Button Setup.
VF page is used to call a controller method to execute and create Record in ERP system using REST API.
<apex:page standardcontroller="Account" extensions="CreateCustomerController" action="{!createCustomer}">
</apex:page>
When user double clicks it is creating duplicate customer records in our ERP system.

How can I prevent this happening.? 
Can I disable the button after first click? 
If you have asome other solution I can try. I have seen some post like below but I am using VF page as content source so don't want use this.
https://developer.salesforce.com/forums/?id=906F000000093GUIAY


 
  • November 04, 2015
  • Like
  • 0
Hi,
How can I pass to the Rest Client all the contacts/Accounts  thro' REST API using @HTTPGet  if there are more than 50000 records?.

 
  • September 30, 2015
  • Like
  • 0
I am getting error Invalid sobject field. 

CmpaignMember cm =new CmpaignMember();
cm.phone='9834734';
Any help appreciated.

thanks
K
  • November 12, 2014
  • Like
  • 0
I am not sure what I am missing.
when I assigning first  approver getting error. 
(1873818027)|WF_NEXT_APPROVER|Tibisay Montilva|Usuario relacionado|: Channel Manager User 09:40:29.527 (2527557929)|PUSH_NOTIFICATION_INVALID_APP|sf_app_internal|Chatter_for_iOS_Enterprise 09:40:29.687 (2687899006)|PUSH_NOTIFICATION_NO_DEVICES|sf_chttr_apps|Chatter_for_Android 09:40:29.687 (2687919613)|PUSH_NOTIFICATION_NO_DEVICES|sf_chttr_apps|Chatter_for_iOS 09:40:30.344 (3344372401)|CODE_UNIT_FINISHED|Workflow:ApprovalProcessActions 09:40:30.344 (3344506164)|DML_END|[120] 09:40:30.344 (3344608924)|EXCEPTION_THROWN|[120]|System.DmlException: Process failed. First exception on row 0; first error: INVALID_CROSS_REFERENCE_KEY, invalid cross reference id: [] 09:40:30.345 (3345319343)|SYSTEM_METHOD_EXIT|[120]|Approval.process(Approval.ProcessRequest) 09:40:30.345 (3345348108)|METHOD_EXIT|[88]|01pU0000001CTpf|My_Class.submitToApprovalProcess(Custom_Object__c)
09:40:30.345 09:40:30.345 (3345518872)|USER_DEBUG|[92]|DEBUG|****ExceptionSystem.DmlException: Process failed. First exception on row 0; first error: INVALID_CROSS_REFERENCE_KEY, invalid cross reference id: [] 09:40:30.345 (3345525814)|SYSTEM_METHOD_EXIT|[92]|System.debug(ANY) 09:40:30.345 (3345555691)|SYSTEM_METHOD_ENTRY|[93]|System.DmlException.getMessage() 09:40:30.345 (3345586143)|SYSTEM_METHOD_EXIT|[93]|System.DmlException.getMessage() 09:40:30.345 (3345661592)|SYSTEM_METHOD_ENTRY|[93]|ApexPages.addMessage(ApexPages.Message) 09:40:30.345 (3345690763)|VF_PAGE_MESSAGE|Exception occuredProcess failed. First exception on row 0; first error: INVALID_CROSS_REFERENCE_KEY, invalid cross reference id: [] 

The same code works fine in sandbox for same profile and in prod .it is failing.
For some other Partner user it works fine

My code looks like this
Approval.ProcessSubmitRequest req = new Approval.ProcessSubmitRequest();
        req.setComments('Request submitted for approval automatically.');
        req.setObjectId(newApplication.id);
        req.setSkipEntryCriteria(true);
        req.setNextApproverIds(new Id[] {newApplication.Channel_Manager__c});
        Approval.ProcessResult result = Approval.process(req);

Am I missing any permission or configuration that is causing this error on submitting from partner Portal user.

I have prrovided all the permissions for the object for this user profile.

thanks
Kab.

 
  • November 06, 2014
  • Like
  • 0
Is it possible to provide user to input a toaddress  for email template  while sending an email?
If so how can I do that?

thanks
kab
  • March 22, 2014
  • Like
  • 0
Hi I want to display a picklist on VFpage and call a contrpoller method to refresh part of the VF page.
Suppose Lead.Status selection I wanted to call a controller extension
How can I do that?

Please send me some code to acheive this.
  • March 10, 2014
  • Like
  • 0

I see the Field ContactID and AccountId on user object thro' fields UI browser  but when I go to UI or page layout I don't see.

 

How can I see that on user pagelayout?

 

 

thanks

kab

  • October 27, 2013
  • Like
  • 0

Hi ,

I am looking at apex code to check thro triggers check if the record already exists  and display an error.

 

Suppose on Contact record  wanted to check  if Name+ email+phone exists then display an error to the user that duplicate record.

 

Is there any sample code anyone can share with me?

 

thanks

K

  • September 13, 2013
  • Like
  • 0

 

I can think of these

Access to the Webservice APIs to integrate with other systems

Create  Custom profiles, pagelayouts, record types, field-level security

Enterprise Analytics – including Dynamic Dashboards

Workflow (Field updates, Task creation, Alert Emails,)

Approval processes

Developer sandbox

Custom Apex code  such as Triggers, Classes

 

is there any other great cool just config only features(no apex code) are not there in  Professional edition and available in Enterprise edition?

 

thanks

K

  • September 07, 2013
  • Like
  • 0

Hi

I wanto update few fields on opportunity and rest of the fields are read only and it is for few users. is there a standard out of box functionality I can use that would give most the fields read only and few fields editable?

I can use different page layouts for some of the profiles etc.

What is the best approach?

 

 

thanks

K

  • September 07, 2013
  • Like
  • 0

I wanted to know if I can change the Dashboard Tab.If yes then How? I am on Professional Edition

 

thanks

K

  • August 28, 2013
  • Like
  • 0
I wanted to read stock price Yahoo or any other site like google finance or msn but cant get any sample code. I tried the following sample  and it is not working now.
https://developer.salesforce.com/blogs/developer-relations/2010/02/spring-10-saw-the-general-availability-of-one-of-my-favorite-new-features-of-the-platform-the-apex-schedulerwith-the-apex-s.html

Is there any public url available free to get stock price?
  • December 12, 2017
  • Like
  • 1
Hi all,

I have an custom object named country with two picklist fields country and states.  Country is the controlling field for States.  Now I want to display these two picklist in the lightning page with the controlling and dependent picklist behavior.  Kindly let me know how I can achieve this.

Thanks in advance

Regards

V Swathi
Hi I have 2 different custom objects with field values same in both objects and wanted to query matching records. Also wanted to query records from both objects.
in sql I write like this
(SELECT Ord.OrderID__c, Cust.CustomerName__c, Ord.OrderDate__c
FROM Orders__c  Ord
INNER JOIN Customers__c  cust
ON Ord.CustomerID__c=Cust.CustomerID__c)

Please let me know how can I write in soql.

thanks in advance.
  • June 16, 2017
  • Like
  • 0
I am looking for code to escape double quote and backslash.
String val='my "test" \string';
after escape it should display
my "test" \string

thanks in advance.
  • January 31, 2017
  • Like
  • 0
Hi there,

I have a knowledge Article, which I want to translate to another langauge from english.
When I submit this article for translation. Then Translation_Status__c should be changed to 'Requested To Translate'
as soon as the new record is created.
I've write a workflow for this. but workflow is not firing when the record is created. It's only working when the record is edited.


 
Getting error when I call get future method from a future or Queable Class fand invoke thro' trigger.

System.VisualforceException: org.apache.commons.httpclient.RedirectException: Maximum redirects (100) exceeded.
Salesforce doc says  we can call pageRef.getcontent() method from a trigger and it is released in Winter 2016.

Is this really fixed or still having issues?
  • January 21, 2016
  • Like
  • 0
Hello,
I am having error "Error Occurred: Guest users are not permitted in internal communities"  when I use site guest user to post message  to chatter thro' process flow.

​How can I fix it? Is it something I am missing permission on chatter for this site guest user?
  • November 04, 2015
  • Like
  • 0
I am getting error Invalid sobject field. 

CmpaignMember cm =new CmpaignMember();
cm.phone='9834734';
Any help appreciated.

thanks
K
  • November 12, 2014
  • Like
  • 0
I am not sure what I am missing.
when I assigning first  approver getting error. 
(1873818027)|WF_NEXT_APPROVER|Tibisay Montilva|Usuario relacionado|: Channel Manager User 09:40:29.527 (2527557929)|PUSH_NOTIFICATION_INVALID_APP|sf_app_internal|Chatter_for_iOS_Enterprise 09:40:29.687 (2687899006)|PUSH_NOTIFICATION_NO_DEVICES|sf_chttr_apps|Chatter_for_Android 09:40:29.687 (2687919613)|PUSH_NOTIFICATION_NO_DEVICES|sf_chttr_apps|Chatter_for_iOS 09:40:30.344 (3344372401)|CODE_UNIT_FINISHED|Workflow:ApprovalProcessActions 09:40:30.344 (3344506164)|DML_END|[120] 09:40:30.344 (3344608924)|EXCEPTION_THROWN|[120]|System.DmlException: Process failed. First exception on row 0; first error: INVALID_CROSS_REFERENCE_KEY, invalid cross reference id: [] 09:40:30.345 (3345319343)|SYSTEM_METHOD_EXIT|[120]|Approval.process(Approval.ProcessRequest) 09:40:30.345 (3345348108)|METHOD_EXIT|[88]|01pU0000001CTpf|My_Class.submitToApprovalProcess(Custom_Object__c)
09:40:30.345 09:40:30.345 (3345518872)|USER_DEBUG|[92]|DEBUG|****ExceptionSystem.DmlException: Process failed. First exception on row 0; first error: INVALID_CROSS_REFERENCE_KEY, invalid cross reference id: [] 09:40:30.345 (3345525814)|SYSTEM_METHOD_EXIT|[92]|System.debug(ANY) 09:40:30.345 (3345555691)|SYSTEM_METHOD_ENTRY|[93]|System.DmlException.getMessage() 09:40:30.345 (3345586143)|SYSTEM_METHOD_EXIT|[93]|System.DmlException.getMessage() 09:40:30.345 (3345661592)|SYSTEM_METHOD_ENTRY|[93]|ApexPages.addMessage(ApexPages.Message) 09:40:30.345 (3345690763)|VF_PAGE_MESSAGE|Exception occuredProcess failed. First exception on row 0; first error: INVALID_CROSS_REFERENCE_KEY, invalid cross reference id: [] 

The same code works fine in sandbox for same profile and in prod .it is failing.
For some other Partner user it works fine

My code looks like this
Approval.ProcessSubmitRequest req = new Approval.ProcessSubmitRequest();
        req.setComments('Request submitted for approval automatically.');
        req.setObjectId(newApplication.id);
        req.setSkipEntryCriteria(true);
        req.setNextApproverIds(new Id[] {newApplication.Channel_Manager__c});
        Approval.ProcessResult result = Approval.process(req);

Am I missing any permission or configuration that is causing this error on submitting from partner Portal user.

I have prrovided all the permissions for the object for this user profile.

thanks
Kab.

 
  • November 06, 2014
  • Like
  • 0
Hi I want to display a picklist on VFpage and call a contrpoller method to refresh part of the VF page.
Suppose Lead.Status selection I wanted to call a controller extension
How can I do that?

Please send me some code to acheive this.
  • March 10, 2014
  • Like
  • 0

I see the Field ContactID and AccountId on user object thro' fields UI browser  but when I go to UI or page layout I don't see.

 

How can I see that on user pagelayout?

 

 

thanks

kab

  • October 27, 2013
  • Like
  • 0

 

I can think of these

Access to the Webservice APIs to integrate with other systems

Create  Custom profiles, pagelayouts, record types, field-level security

Enterprise Analytics – including Dynamic Dashboards

Workflow (Field updates, Task creation, Alert Emails,)

Approval processes

Developer sandbox

Custom Apex code  such as Triggers, Classes

 

is there any other great cool just config only features(no apex code) are not there in  Professional edition and available in Enterprise edition?

 

thanks

K

  • September 07, 2013
  • Like
  • 0

Hi

I wanto update few fields on opportunity and rest of the fields are read only and it is for few users. is there a standard out of box functionality I can use that would give most the fields read only and few fields editable?

I can use different page layouts for some of the profiles etc.

What is the best approach?

 

 

thanks

K

  • September 07, 2013
  • Like
  • 0

 

Messaging.SingleEmailMessage[] emails =new List<Messaging.SingleEmailMessage>();

 

//List<Contact> lstContacts=[Select Id,EMail FROM Contact WHERE EMAIL!=null];

for(Contactcont :lstContacts) {

Blob b =null;

Pagereference page =new Pagereference('/' + 'apex/OpportunityReport?cid='+cont.Id );

page.setRedirect(true);

Messaging.SingleEmailMessage mail =newMessaging.SingleEmailMessage();

String [] toAddresses =newString[] {email};

mail.setToAddresses(toAddresses);

mail.setSubject('Opportunity Report');

mail.setPlainTextBody('Please see the attached html report');

 

// Create an email attachment

Messaging.EmailFileAttachment efa =new Messaging.EmailFileAttachment();

efa.setFileName(cont.Id+'report.html');

 

if (!Test.isRunningTest()){//unable to call .getContent() within tests

b = page.getContent();

}

else{

b = Blob.valueOf('Unit Test Attachment Body');

 

}

efa.setBody(b);

//attach the PDF /html

efa.setContentType('text/html');

mail.setFileAttachments(newMessaging.EmailFileAttachment[] {efa});

emails.add(mail);

 

}

 

Messaging.sendEmail(emails);

 

When I call this method  from a button click it send the attachment and I can see the attachment content is there but when I use batch apex and try to open this the link from eamail it asks user id and password always send me 2k filesize with links to salesforce page.

 

please let me know if you have comeacross simillar issue

 

Thanks

K

  • April 22, 2013
  • Like
  • 0

Hi

 

As i have submitted the package for the security review process and have received some minor security issues.Which i have resolved it and going forward uploaded the package with the new version and went off for submitting the pakage for security review process from appexchange through the security wizard.At last step for the submitting the package it ask me the payment details.As i have already done the payment in the first time for submitting security review process.Than how do i move forward for resubmitting the package for the security review process.

 

Thanks,

Atif