• Hithesh Saicharan
  • NEWBIE
  • 65 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 16
    Questions
  • 10
    Replies
I want to convert this decimal value 10600.05 into 10,600 in APEX. and I am trying with this code
 
Decimal rA = 10600.86;
Integer Intval=ra.intvalue();
List<String> args = new String[]{'0','number','###,###,###,###'};
String s = String.format(Intval.format(), args);


But I am always getting 

10 600 as output. Comma is not coming in output. I want this only in APEX and in VF page. Any help please?
I know just a odd questions but need some help
We had some licenses with AWS and AWS technical team is asking us to take some certifications related to salesforce.
We are not sure which AWS certications can add value to our salesforce team / career. So want to know the AWS certifications related to salesforce.
I know there is a certification salesforce is giving (AWS Cloud Practitioner Certification) but we need to do certication in Amazon which is related to salesforce
I want to integrate angular application in salesfoce.Saying angular application is having its own login mechanisam but when a user comes from salesforce he/she must not be authenticated again in angular.

If my understanding is correct Salesforce has to be Identiy provider and angular has to be as service provider.

I am not able to find any correct material to approach this requirment. Any help would be appreciated
This is odd question. 
I got a requirement to change the some of the record type in application. 
Record type can be used in trigger, process builder or some where else.
This is existing application and I am new to that application so 100% not sure about the business flows.
and not able to find out where that particular record type is used. Any suggestion?
Our company is trying to back up the data on weekly basis and planning to store it in drop box. Need some suggestions please.
I want to post some data to EHR in call out. The data I am having is nearly 5000 characters of length and it cant be split up. It has to be sent in single attribute named "Description". I am not able to find the max character limit which can be send in a single attribute in APEX.
I am having a drop down field with values Visiting today, going to visit, 1 day after visit and so on .Depending on date I want to update that field. Say if suppose user signed today I have to show Visiting today. This I must not calculate during login. Because if user might not login also in back ground the value has to be changed because of report generation.
I tried with Flow for this scenario but things are not working as expected. If I go with scheduler and batch class whether performance issue will happen. Because now I am having 1000 records. What if the record grows after five years? How to overcome the performance issue if lakhs of records comes in future?
Hi All, 
I am having one Custom metadata named Application_Configuration__mdt which is having a custom field as like below
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>Value__c</fullName>
    <externalId>false</externalId>
    <fieldManageability>DeveloperControlled</fieldManageability>
    <label>Value</label>
    <length>200</length>
    <required>false</required>
    <type>Text</type>
    <unique>false</unique>
</CustomField>

and having one record  as like below
 
<?xml version="1.0" encoding="UTF-8"?>
<CustomMetadata xmlns="http://soap.sforce.com/2006/04/metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <label>API key</label>
    <protected>false</protected>
    <values>
        <field>Value__c</field>
        <value xsi:type="xsd:string">XXXXXXXXX</value>
    </values>
</CustomMetadata>

I created one 2GP unlocked package and installed in a scratch org. After installation I tried to change the value from XXXXXXXX to some other.But when i click on edit record the value field itself is not Visible. Only I can able to cenge the Label and configuration name. 

How I can able to change the value .If we cant cange custom metadata record value what is the other choice?
 

I want to load some into into an object after a package got installed. I tried post install script but seems post install script will work only for 2GP Managed packages and not for Unlocked Packages. Is there a way I can load data into an object once my unlocked package got installed?
I am planning to implement connected API for my application. So as a start I just wrote simple httpPost method and checked whether I can able to hit through post man.
and here is my simple code
@RestResource(urlMapping='/PostToChatter')
global class GetChatter{
    @HTTPPost
    global static void createChatterRecords(){
       
          System.debug('Success >>>');
          RestResponse response = RestContext.response;
          response.addHeader('Content-Type', 'application/json');
          response.responseBody = Blob.valueOf('{ "Excuted succesfully" : "EXECUTED" }');
          response.statusCode = 201;
    }
}

Inorder to hit this method I created connected app and after giving client id, client secret, user name , password i got access_token as below
User-added image
00D2v000001e2OE!ARsAQHzfP_5D0wui2bSyRFg_M8slkwU3pK2t7cB99lqrMNDB8es1aDluf46dL.RpLKQQxPJrM1fwQyyfhG0NmfEeegB4h.b2

and here is my instance URL
 
https://hitheshm-dev-ed.lightning.force.com/services/apexrest/PostToChatter

and even I tried with 
https://hitheshm-dev-ed.my.salesforce.com/services/apexrest/PostToChatter

User-added imagebut I am always getting
 
<h1>Bad Message 400</h1>
<pre>reason: No Host</pre>

For Headers I tried with Authorization = Bearer <access_token> or Authorization = OAuth <access_token>
and noting is working. I am not doing any fancy coding here. Not sure why its not working.
PS: Since this is my dev org I am sharing my access token. Later I will change the token once it got worked.
We are having two modules one is developed in salesforce and another is Node JS(Postgres DB). So wee need to send some data from Node JS to chatter in salesforce and also vice versa. What is the best approach to do this implementation?
Since Approval process cannot be packaged in 2GMP , as a work around I removed the approval process folder alone from 2GMP and created a managed package with classes,LWC,Objects,Worksflows etc.
and got version as like below
"namespace": "MMR",
 "packageAliases": { "OVION Managed@0.1.0-5": "04t2w0000XXXXXX" }

Then I am trying to create a unlocked package with approval process alone which depends on the above 2GMP and here is the configuration in 
sfdc-project.json

{ "packageDirectories": [ 
{ "path": "source-folder", 
"default": true, 
"package": "Process Check", 
"versionName": "ver 0.1",
 "versionNumber": "0.1.0.NEXT", "
dependencies": [ 
{ "package": "OVION Managed@0.1.0-5" } ] }
 ], 
"namespace": "", "sfdcLoginUrl": "https://login.salesforce.com",
 "sourceApiVersion": "50.0", 
"packageAliases": {
 "Process Check": "0Ho2w000000XXXXX", 
"OVION Managed@0.1.0-5": "04t2w0000XXXXXX" }
 }


When I tried to create version for the unlocked package with command
>sfdx force:package:version:create --package "Process Check" --installationkeybypass --wait 20


CLI is checking for dependencies and getting error as like below
ERROR running force:package:version:create: Extension__c.ExtensionTierApproval: Entity 'Extension__C' not found.
Request in progress. Sleeping 30 seconds. Will wait a total of 1140 more seconds before timing out. Current Status='Verifying dependencies' 
Request in progress. Sleeping 30 seconds. Will wait a total of 1110 more seconds before timing out. Current Status='Verifying dependencies'
 Request in progress. Sleeping 30 seconds. nds. Will wait a total of 930 more seconds before timing out. Current Status='Verifying dependencies' 
Request in progress. Sleeping 30 seconds. Will wait a total of 900 more seconds before timing out. Current Status='Verifying dependencies' 
ERROR running force:package:version:create: Extension__c.ExtensionTierApproval: Entity 'Extension__C' not found.


I am having nearly 10 Approval process but for now I am just trying for only one process(Extension__c.ExtensionTierApproval). So if things are fine thought of to do for remaining 9.
As per error I am having Extension__C Custom object in 2GMP.
As we know that Autonumber field in standard object cannot be packaged. So Before creating package I converted the Autonumber to Text field and after installation in a scracth org I tried to change the Field type of that field but I am not able to do that. Even I cant delete that field.I am getting this Error 
This Custom Field Definition is managed, meaning that you may only edit certain attributes.

 Is there a way we can achieve this in post installation step? or any other workaround.
I am planning to create a managed package. Since managed packages cant be created in sandboxes , I created one dev org and tried to move the Profiles and Objects from my sand box to Dev org. But I am always getting below error.
 
18.  objects/Case.object (Case.Language) -- Error: Could not resolve standard field's name. (line 1292, column 13)
19.  profiles/Caseworker.profile -- Error: Unknown user permission: OverrideForecasts
20.  profiles/Intake Worker.profile -- Error: Unknown user permission: AIViewInsightObjects
21.  profiles/Provider Community.profile -- Error: Unknown user permission: OverrideForecasts
22.  profiles/Public Community.profile -- Error: Unknown user permission: OverrideForecasts
23.  profiles/Supervisor.profile -- Error: Unknown user permission: ApproveContract

 
Hi,

Is there any site to take Mock exam for javascript developer certification , so that it gives some confident that we can take up the exam or have to prepare more for exam
Hi All,

I am trying for some nice alignment in flow builder. Is it possible to acheive like below.
User-added image
I want to convert this decimal value 10600.05 into 10,600 in APEX. and I am trying with this code
 
Decimal rA = 10600.86;
Integer Intval=ra.intvalue();
List<String> args = new String[]{'0','number','###,###,###,###'};
String s = String.format(Intval.format(), args);


But I am always getting 

10 600 as output. Comma is not coming in output. I want this only in APEX and in VF page. Any help please?
This is odd question. 
I got a requirement to change the some of the record type in application. 
Record type can be used in trigger, process builder or some where else.
This is existing application and I am new to that application so 100% not sure about the business flows.
and not able to find out where that particular record type is used. Any suggestion?
Hi All, 
I am having one Custom metadata named Application_Configuration__mdt which is having a custom field as like below
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>Value__c</fullName>
    <externalId>false</externalId>
    <fieldManageability>DeveloperControlled</fieldManageability>
    <label>Value</label>
    <length>200</length>
    <required>false</required>
    <type>Text</type>
    <unique>false</unique>
</CustomField>

and having one record  as like below
 
<?xml version="1.0" encoding="UTF-8"?>
<CustomMetadata xmlns="http://soap.sforce.com/2006/04/metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <label>API key</label>
    <protected>false</protected>
    <values>
        <field>Value__c</field>
        <value xsi:type="xsd:string">XXXXXXXXX</value>
    </values>
</CustomMetadata>

I created one 2GP unlocked package and installed in a scratch org. After installation I tried to change the value from XXXXXXXX to some other.But when i click on edit record the value field itself is not Visible. Only I can able to cenge the Label and configuration name. 

How I can able to change the value .If we cant cange custom metadata record value what is the other choice?
 
I am planning to implement connected API for my application. So as a start I just wrote simple httpPost method and checked whether I can able to hit through post man.
and here is my simple code
@RestResource(urlMapping='/PostToChatter')
global class GetChatter{
    @HTTPPost
    global static void createChatterRecords(){
       
          System.debug('Success >>>');
          RestResponse response = RestContext.response;
          response.addHeader('Content-Type', 'application/json');
          response.responseBody = Blob.valueOf('{ "Excuted succesfully" : "EXECUTED" }');
          response.statusCode = 201;
    }
}

Inorder to hit this method I created connected app and after giving client id, client secret, user name , password i got access_token as below
User-added image
00D2v000001e2OE!ARsAQHzfP_5D0wui2bSyRFg_M8slkwU3pK2t7cB99lqrMNDB8es1aDluf46dL.RpLKQQxPJrM1fwQyyfhG0NmfEeegB4h.b2

and here is my instance URL
 
https://hitheshm-dev-ed.lightning.force.com/services/apexrest/PostToChatter

and even I tried with 
https://hitheshm-dev-ed.my.salesforce.com/services/apexrest/PostToChatter

User-added imagebut I am always getting
 
<h1>Bad Message 400</h1>
<pre>reason: No Host</pre>

For Headers I tried with Authorization = Bearer <access_token> or Authorization = OAuth <access_token>
and noting is working. I am not doing any fancy coding here. Not sure why its not working.
PS: Since this is my dev org I am sharing my access token. Later I will change the token once it got worked.
I have checked the Metadata Coverage (https://developer.salesforce.com/docs/metadata-coverage/46) page, and it confirms that Profile (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_profile.htm) can be included in a 2GP (sfdx) managed package.

I have successfully created the new named profile in a scratch org, and used source:pull to retrieve it into the force-app\main\default\profiles\myprofilename.profile-meta.xml

However, when I create a managed package from it, and install it into an org, I do not see the Profile listed anywhere in the list of package components, nor do I see the profile available in the profiles list after installation.

Is there something I'm missing here? The other components (Apex classes, VisualForce pages, Custom Object types) are all included correctly in the package.
I'm planning to create a Managed Package for a Product. My concern is that how can I automate the Approval Process creation? As there is no option to add the Approval Processes in Package. And for now, when I'm Installing my beta packages in our Test Org/ on Other Developer Orgs I migrate the Approval Processes using Eclipse. But when external users install our package how can they add multiple Approval Process. As the manual way to create those Process is not a great way. It would be great if anyone can help me out through this. 
Thanks,
Sourav
I am trying to integrate Salesforce and Microsoft Dynamics GP service using WSDL (SOAP). However on invoking method from Salesforce, I am getting an exception as "System.CalloutException: IO Exception: External server did not return any content".

I have set the endpoint in Remote Site Setting in SFDC. For authentication, I have used Basic authentication and passing it in the "inputHttpHeaders_x" parameter as we don't have login or authorization nodes available in WSDL.

Any inputs on this issue will be helpful.

Thanks.
I have an angular application using salesforce to save data and allowing users to Authenticate. I am currently building a salesforce lightning application and I want to be able to use SSO to seemlessly log into the angular application without out having to authenticate.

If this is possible can you point me into the right direction with materials or examples that I can reference. Its a new concept for me.
  • September 24, 2018
  • Like
  • 0
Hello all,
    I want to create my own dataset for Einstein.Could you please help me.? I have created but facing problem.


 
How can external users use chatter endpoint url to post inside salesforce chatter?