• Shamina
  • NEWBIE
  • 40 Points
  • Member since 2011

  • Chatter
    Feed
  • 1
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 22
    Replies
Hello,
I want to display richtext area field value to be rendered without the HTML tags but i am not able to. I have tried with both of the below lines.
<apex:outputtext value="{!objWorkFeedback.Feedback}" escape="false"/>
<apex:outputfield value="{!objWorkFeedback.Feedback}"/>

I am not sure what the reason could be? Any suggestions or workarounds ?

Thanks is advance

 
There are a lot of questions related to "System.CalloutException: You have uncommitted work pending" errors, but could not find solution for following use case:
There's a static method in the test class which inserts a test user, a custom settings record, account and opportunity records. Then the test methods run as the testing user and covers code for a queueable apex that executes an HTTP callout.
 
@isTest
private class ProjectCalloutServiceTest {
    static List<Opportunity> oppLst;
    static Account acc;
    static User adminUser;

    static{ 
        Id admProfId = TestFactory.getProfileAdminId();
        adminUser = TestFactory.createUser('FirstAdmin',admProfId);
        insert adminUser;

        System.runAs(adminUser){
            //create the Custom Settings
            ServiceTokens__c servToken = new ServiceTokens__c(
                                        Name = 'ProjectServiceToken'
                                        ,Token__c = 'DUMMY-TOKEN');
            insert servToken;

            //create account
            Account acc = TestFactory.createAccount('Account 1');
            insert acc;

            //create oppty
            oppLst = new List<Opportunity>{
                    TestFactory.createOpportunity('Project1',acc.Id, 'New project'
                        ,'Submitted Project', Date.newInstance(2019, 11, 17), 17000),
                    TestFactory.createOpportunity('Project2',acc.Id, 'New project'
                        ,'Resubmit Project', Date.newInstance(2019, 12, 17), 17000)
                    };
            insert oppLst;
        }
    }

    @isTest static void testCalloutSuccess() {
        System.runAs(adminUser){
            Test.startTest();
                // Set mock callout class 
                Test.setMock(HttpCalloutMock.class, new ProjectCalloutServiceMock()); 
                ProjectCalloutService.postOpportunityToPMS(new List<Id>{oppLst[0].Id});
            Test.stopTest();  

            Opportunity opp = [select StageName from Opportunity where id =:oppLst[0].Id];
            System.assertEquals('Submitted Project',opp.StageName);
        }
    }

    @isTest static void testCalloutFailure() {
        System.runAs(adminUser){
            Test.startTest();
                // Set mock callout class 
                Test.setMock(HttpCalloutMock.class, new ProjectCalloutServiceMockFailure()); 
                ProjectCalloutService.postOpportunityToPMS(new List<Id>{oppLst[1].Id});        
            Test.stopTest();   
            Opportunity opp = [select StageName from Opportunity where id =: oppLst[1].Id];
            System.assertEquals('Resubmit Project',opp.StageName);
        }
    }

}

When running the above test class, both test method fail with uncommitted work callout exception below:
System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out

However, if only the lines of code for test user creation and system.runas is commented then the test class executes successfully as the running user.
It is recommended to run test methods as a testing user, but then how do we insert the test user in the test class and prevent the uncommitted work error ?
This known issue is similar but is marked as fixed since a long time, I am wondering if the issue still persists.

Any help is appreciated, thanks
The tag "flexipage:reportChart" cannot be used in a custom lightning component.
How can we display an existing LEX report chart within a lightning component that is compatible in communities builder?

thanks
Does someone knows how to include a RSS feed/reader in a lightning component compatible for communities builder?
Thanks
Hello,

This is to report an issue on Trailhead projects units.
The following error message is displayed when trying to go to the next unit of aTrailhead project.
400 Bad Request
Request Header Or Cookie Too Large


Screenshot of the web page displaying the error:
User-added image

Here is a sample URL that I was trying to access, does not when refreshing the URL.
https://developer.salesforce.com/trailhead/project/quickstart-lightning-components/quickstart-lightning-components2

Any help is much appreciated, thanks

Shamina
Hello everyone,

We have developed an application which will be packaged as an AppExchange solution in the near future. The package includes a permission set for which FieldPermissions for contact custom fields are created dynamically in Apex via a Visualforce page. This Visualforce page will be accessed by a system administrator profile.
When testing the Visualforce page in the developer environment, the field permissions are created successfully.
But when testing a beta version of the managed package in a target Salesforce environment, we are having the following error :

Insert failed. First exception on row 0; first error: CANNOT_MODIFY_MANAGED_OBJECT, Cannot modify managed object: entity=FieldPermissions, component=null, state=MANAGED_INSTALLED: []

The permission set is successfully installed in the target Salesforce org, but it seems that since the system administrator is not allowed to modify this managed component it neither allows to insert into FieldPermissions for this permission set.

No similar issue was found in salesforce developer forum

Does anyone know of a workaround to allow inserting into FieldPermissions for a permission set part of the managed package ?

Any help would be highly appreciated

Best Regards,
Shamina
 
Hello,

Does anyone know if it is possible to integrate WeChat with Salesforce?
Salesforce support said there is no standard plugin and we could not find any application on AppExchange.
We have contacted wechat support by mail but we did not receive any reply.

Best Regards,
Shamina

Hello,

We have noted slow response time when external systems call web services developped in our salesforce production organisation. The web service follow the REST architecture.


There exist several web services, and the average response time of the web services 1.5 seconds and sometimes more than 1 minute.

 

What do we need to do to improve the response time ?

 

 

The apex class which implements these REST web services are currently under API 23, can this be related to the performance issue?

 

I have logged a case and am still waiting for some feedback from Salesforce.



Regards,
Shamina

Dear All,

 

I am currently working on an implementation involving updating the user's Google calendar when an event is created or updated in Salesforce calendar.

 

I started to use with Google API toolkit mentionned below to access the Google Calendar API:

http://wiki.developerforce.com/page/Google_Data_APIs_Toolkit_Setup

 

The toolkit has specific Apex classes which implement XMLDom and JSONObject. Since recent releases, there seems to be inbuilt salesforce classes/methods to support for DOM and JSON.

 

The last revision of the toolkit was in 2011, can you please tell me if this toolkit is still valid to use ?

 

Is there a new toolkit which will be available soon to take into account the inbuilt salesforce DOM Classes and JSON support ?

 

Thanking you

Hello,

We have configured territory management and implemented a trigger on account object to update a field based on specific conditions. This field is used as a criteria for running territory assignment rules but when the field is updated by the Apex trigger, we have noticed that the territory rules are not evaluated.

According to online documentation and forums, the territory rules are only triggered from the Salesforce interface (if the option "Run territory assignment rules on save" is enabled and visible on page layouts) or from an API call.

With the new release, is it possible to trigger territory assignment rules from Apex and how to implement it ?

 

If its not possible from Apex, can you please provide some sample PHP codes to run the rules via REST API ?

 

Hello,

In our sandbox environment, we have developed some custom Apex REST API which were executing successfully prior to Spring 12 Sandbox preview.

But following Spring 12 preview, all the Apex Web services, exposed through the REST API architecture, are generating an internal server error when being called from an external system. We are not able to find the cause of the error since we do not have any log messages generated in system debug logs.

 

We have logged a case and Salesforce is still investigating this issue. Has anbody encountered this  ? 

Please find below the error generated when trying to call an Apex REST API from an external system :

<html>
<head><title>An internal server error has occurred</title></head>
<body>


<div style="display:none;" id="errorTitle">An internal server error has occurred</div>
<div style="display:none;" id="errorDesc">An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact <a href="https://na1.salesforce.com/_ui/training/help/pub/UserEdSolution?id=50130000000M9gH&orgId=00D000000000062">Salesforce Support</a>. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience. <br/><br/>Thank you again for your patience and assistance. And thanks for using salesforce.com!
<table cellspacing=10>
<tr><td><span style="font-weight: bold; font-size: 12pt;">An internal server error has occurred</span></td></tr>
<tr><td>
An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact <a href="https://na1.salesforce.com/_ui/training/help/pub/UserEdSolution?id=50130000000M9gH&orgId=00D000000000062">Salesforce Support</a>. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience. <br/><br/>Thank you again for your patience and assistance. And thanks for using salesforce.com!
<br><br>
Error ID: 688850227-38920 (-419261755)
</td>
</tr>
<tr><td>
<br clear="all"><br><br>



</td></tr>
</table>

</td></tr>
</table>



</body>
</html>

Hello,

 

Data is being retrieved from an external system and loaded into Salesforce using PHP toolkit (upserts) but the API requests limit is exceeded. The current limit on the organization is 12,000 and the volume of data to be loaded may exceed 100,000.

 

Even though records are added in arrays and the upsert operation is applied on the array, API requests is accounted for each record.

 

Is there a way to optimize the calls in PHP ? What are the possible solutions ?

 

Thank you for your help

 

 

Hello,

 

Am using PHP toolkit 20.0 to perform some queries on Salesforce Contact object but all empty field values on the record, return the value "true".

 

The queryresult below show the values returned for the query. The fields Phone and Birthdate are both empty for this contact. But the value "true" is returned.

 

$result = $crmHandle->query('SELECT Id, Phone,Birthdate FROM Contact LIMIT 1');
QueryResult Object ( [queryLocator] => [done] => 1 [records] => Array ( [0] => SObject Object ( [type] => Contact [fields] => stdClass Object ( [Phone] => true [LastName] => ContactName [Birthdate] => true ) [Id] => 003M0000006YESuIAO ) ) [size] => 1 ) 

 

Why is the result of the query for empty fields not a blank string or null ? Is there something I must change in the query or when processing the results ? 

 

Thank you for your help

Hello,

 

We have been able to connect ODI (Oracle Data Integrator) tool to a Salesforce Developer account and perform a reverse engineering process to load salesforce objects' data models into ODI.

 

We have developed an apex class with a web service method to call another batch apex class method available in the Salesforce developer account.

 

Our requirement is to call the web service method (hence the batch apex) from ODI. In salesforce, we have downloaded the partner.wsdl and generated the wsdl file for global apex class which contains the web service method. In ODI, there is a tool called ODiInvokeWebService which can be used to call a wsdl file. When we referenced the wsdl file for the apex class and invoke the method which will call the batch apex, we are having the following error message in ODI:

 

com.sunopsis.wsinvocation.SnpsWSInvocationException: INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session

 at com.sunopsis.wsinvocation.client.a.a.d.requestReply(d.java)
 at com.sunopsis.graphical.wsclient.f.b(f.java)
 at com.sunopsis.graphical.tools.utils.swingworker.v.call(v.java)
 at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)
 at com.sunopsis.graphical.tools.utils.swingworker.l.run(l.java)
 at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
 at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
 at java.lang.Thread.run(Thread.java:662)

at com.sunopsis.wsinvocation.client.a.a.d.requestReply(d.java)

 at com.sunopsis.graphical.wsclient.f.b(f.java) at com.sunopsis.graphical.tools.utils.swingworker.v.call(v.java)

 at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)

 at com.sunopsis.graphical.tools.utils.swingworker.l.run(l.java)

 at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)

at java.lang.Thread.run(Thread.java:662)

 

 

The issue is that, we are also able to initiate a login using the partner.wsdl in ODI but we do not know how to pass the session ID value to the global apex class wsdl. The only method in the global apex class wsdl available to call from ODI, is the web service method to call the batch apex. There is no login method as such as in partner.wsdl.

 

Can you please tell us a way to create a valid session which will allow us to call the batch apex in Salesforce?

 

Thanks and Regards,

Shamina

Hello,

Does anyone know if it is possible to integrate WeChat with Salesforce?
Salesforce support said there is no standard plugin and we could not find any application on AppExchange.
We have contacted wechat support by mail but we did not receive any reply.

Best Regards,
Shamina

Hi All,

I'm facing issue when I load Lightning page with Locker Service enabled.
When I deactivate the "Locker Service", the slider [Jquery Plugin] is working fine in my lightning page.
I'm using "Slider" js files from Static Resources for my lightning page.

With Locker Service Enabled:
User-added image

Without Locker Service
User-added image

When page get loads,we're getting the following error
" WARNING: SecureElement: [object HTMLDivElement]{ key: {"namespace":"c"} } does not allow getting/setting the disabled attribute, ignoring!"

I've explored it in salesforce document, in which they told that "they can served from Static Resources and approved by security".
For Reference:
https://developer.salesforce.com/blogs/developer-relations/2016/04/introducing-lockerservice-lightning-components.html

Do we need to do any other process to get approve?
Can you please let us know how to get approve for static resource?

 

Hi All,
I am interested in restarting my career in Salesforce after a break of 5 years.  I have attended classroom training in December 2015 and preparing for my first certification (App Builder).  I have 10 years of experience in IT industry  out of which 2 years in Salesforce.  Kindly recommend me what are the steps I need to take to kick start my second innings in my career.  I am based in Bangalore, India.

Thanks in Advance.
 
Hello,

This is to report an issue on Trailhead projects units.
The following error message is displayed when trying to go to the next unit of aTrailhead project.
400 Bad Request
Request Header Or Cookie Too Large


Screenshot of the web page displaying the error:
User-added image

Here is a sample URL that I was trying to access, does not when refreshing the URL.
https://developer.salesforce.com/trailhead/project/quickstart-lightning-components/quickstart-lightning-components2

Any help is much appreciated, thanks

Shamina
Per the docs, "Visualforce mapping components aren’t available in Developer Edition organizations". This is unfortunate if you're trying to develop a package in a dev org. Is there a way to create a Visualforce Map in a Dev Org that when deployed to an EE org, it will display?
When querying Custom Metadata, is there a simple method to getting a MAP of DeveloperName to the record so it can be retrieved by a single name?  Custom Settings has this, but doing a standard MAP/SOQL gives the ID to the record instead of the DeveloperName.
Hello everyone,

We have developed an application which will be packaged as an AppExchange solution in the near future. The package includes a permission set for which FieldPermissions for contact custom fields are created dynamically in Apex via a Visualforce page. This Visualforce page will be accessed by a system administrator profile.
When testing the Visualforce page in the developer environment, the field permissions are created successfully.
But when testing a beta version of the managed package in a target Salesforce environment, we are having the following error :

Insert failed. First exception on row 0; first error: CANNOT_MODIFY_MANAGED_OBJECT, Cannot modify managed object: entity=FieldPermissions, component=null, state=MANAGED_INSTALLED: []

The permission set is successfully installed in the target Salesforce org, but it seems that since the system administrator is not allowed to modify this managed component it neither allows to insert into FieldPermissions for this permission set.

No similar issue was found in salesforce developer forum

Does anyone know of a workaround to allow inserting into FieldPermissions for a permission set part of the managed package ?

Any help would be highly appreciated

Best Regards,
Shamina
 
Hi folks,
        Can anyone tell me how to follow the another user in Salesforce Org?
There are 3 user in my org.
like user1,user2,user2

User3 wanna follow user1 
for that how to write vfp;

My VFP:
 
<apex:page standardStylesheets="true" showHeader="false">  
   <chatter:feedwithFollowers entityId="{!$User.Id}"/>
   
   

   <chatter:follow entityId=""  />//I dono what to write here
   
</apex:page>

Thanks in advance
Karthick
Hello,
I want to display richtext area field value to be rendered without the HTML tags but i am not able to. I have tried with both of the below lines.
<apex:outputtext value="{!objWorkFeedback.Feedback}" escape="false"/>
<apex:outputfield value="{!objWorkFeedback.Feedback}"/>

I am not sure what the reason could be? Any suggestions or workarounds ?

Thanks is advance

 

Hello,

We have noted slow response time when external systems call web services developped in our salesforce production organisation. The web service follow the REST architecture.


There exist several web services, and the average response time of the web services 1.5 seconds and sometimes more than 1 minute.

 

What do we need to do to improve the response time ?

 

 

The apex class which implements these REST web services are currently under API 23, can this be related to the performance issue?

 

I have logged a case and am still waiting for some feedback from Salesforce.



Regards,
Shamina

I am getting this error trying to deploy a few reports to our full sandbox. Anyone have any ideas as to what is going on?

 

BTW, the reports that are giving the error, are just basic reports, no joined reports, It is really just a report on Accounts with Opportunities

Hello,

We have configured territory management and implemented a trigger on account object to update a field based on specific conditions. This field is used as a criteria for running territory assignment rules but when the field is updated by the Apex trigger, we have noticed that the territory rules are not evaluated.

According to online documentation and forums, the territory rules are only triggered from the Salesforce interface (if the option "Run territory assignment rules on save" is enabled and visible on page layouts) or from an API call.

With the new release, is it possible to trigger territory assignment rules from Apex and how to implement it ?

 

If its not possible from Apex, can you please provide some sample PHP codes to run the rules via REST API ?

 

Hello,

In our sandbox environment, we have developed some custom Apex REST API which were executing successfully prior to Spring 12 Sandbox preview.

But following Spring 12 preview, all the Apex Web services, exposed through the REST API architecture, are generating an internal server error when being called from an external system. We are not able to find the cause of the error since we do not have any log messages generated in system debug logs.

 

We have logged a case and Salesforce is still investigating this issue. Has anbody encountered this  ? 

Please find below the error generated when trying to call an Apex REST API from an external system :

<html>
<head><title>An internal server error has occurred</title></head>
<body>


<div style="display:none;" id="errorTitle">An internal server error has occurred</div>
<div style="display:none;" id="errorDesc">An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact <a href="https://na1.salesforce.com/_ui/training/help/pub/UserEdSolution?id=50130000000M9gH&orgId=00D000000000062">Salesforce Support</a>. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience. <br/><br/>Thank you again for your patience and assistance. And thanks for using salesforce.com!
<table cellspacing=10>
<tr><td><span style="font-weight: bold; font-size: 12pt;">An internal server error has occurred</span></td></tr>
<tr><td>
An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact <a href="https://na1.salesforce.com/_ui/training/help/pub/UserEdSolution?id=50130000000M9gH&orgId=00D000000000062">Salesforce Support</a>. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience. <br/><br/>Thank you again for your patience and assistance. And thanks for using salesforce.com!
<br><br>
Error ID: 688850227-38920 (-419261755)
</td>
</tr>
<tr><td>
<br clear="all"><br><br>



</td></tr>
</table>

</td></tr>
</table>



</body>
</html>

Hello,

 

Data is being retrieved from an external system and loaded into Salesforce using PHP toolkit (upserts) but the API requests limit is exceeded. The current limit on the organization is 12,000 and the volume of data to be loaded may exceed 100,000.

 

Even though records are added in arrays and the upsert operation is applied on the array, API requests is accounted for each record.

 

Is there a way to optimize the calls in PHP ? What are the possible solutions ?

 

Thank you for your help

 

 

Hello,

 

We have been able to connect ODI (Oracle Data Integrator) tool to a Salesforce Developer account and perform a reverse engineering process to load salesforce objects' data models into ODI.

 

We have developed an apex class with a web service method to call another batch apex class method available in the Salesforce developer account.

 

Our requirement is to call the web service method (hence the batch apex) from ODI. In salesforce, we have downloaded the partner.wsdl and generated the wsdl file for global apex class which contains the web service method. In ODI, there is a tool called ODiInvokeWebService which can be used to call a wsdl file. When we referenced the wsdl file for the apex class and invoke the method which will call the batch apex, we are having the following error message in ODI:

 

com.sunopsis.wsinvocation.SnpsWSInvocationException: INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session

 at com.sunopsis.wsinvocation.client.a.a.d.requestReply(d.java)
 at com.sunopsis.graphical.wsclient.f.b(f.java)
 at com.sunopsis.graphical.tools.utils.swingworker.v.call(v.java)
 at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)
 at com.sunopsis.graphical.tools.utils.swingworker.l.run(l.java)
 at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
 at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
 at java.lang.Thread.run(Thread.java:662)

at com.sunopsis.wsinvocation.client.a.a.d.requestReply(d.java)

 at com.sunopsis.graphical.wsclient.f.b(f.java) at com.sunopsis.graphical.tools.utils.swingworker.v.call(v.java)

 at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)

 at com.sunopsis.graphical.tools.utils.swingworker.l.run(l.java)

 at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)

at java.lang.Thread.run(Thread.java:662)

 

 

The issue is that, we are also able to initiate a login using the partner.wsdl in ODI but we do not know how to pass the session ID value to the global apex class wsdl. The only method in the global apex class wsdl available to call from ODI, is the web service method to call the batch apex. There is no login method as such as in partner.wsdl.

 

Can you please tell us a way to create a valid session which will allow us to call the batch apex in Salesforce?

 

Thanks and Regards,

Shamina

Does anyone know if you can merge a lead from the after trigger of the inserted lead?

I get the error: The master record id [SObject id] appears in the merge id list:

My thinking is you can't merge a Lead, Contact, or Account while inserting that record.

Business case:
On the insert of a lead I am querying to see if there is other leads with the same email.
If so then merge the inserted lead with the found lead.

Thank you.
  • August 13, 2008
  • Like
  • 0
I have written a C# application that forces territory rules to run on a scheduled time period by running the salesforce generated URL.  So I am trying to write a trigger that runs the territory rules when an Opportunity is either created or updated!  The problem is that I don't see a way to force the territory rules to run! 

Does any one have a practical solution?  BTW, I tried to update the account associated with the opportunity.  If I do it via Salesforce, the account page layout forces the territory rules to run.  This is due to the checkbox 'Run territory Assignment Rules on save by default' on the account page layout.  But, it seems this doesn't work via the API.

Any information on this matter would be greatly appreciated!