Skip to main content

Questions tagged [convert]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
11 votes
4 answers
79k views

Function to convert String to Decimal value?

I need to convert String into Decimal. the isNumeric() method is retuning false if value is Decimal. Another alternate: try { Integer x = Integer.valueOf(myString); } catch (exception e) { // ...
Kuldeep Parihar's user avatar
9 votes
2 answers
2k views

Convert a binary value to an decimal value

I would like to know if there is a method to convert a binary value to a decimal value? For example, I need to convert the binary 10000101111010 and get the result 8570.
Oupat's user avatar
  • 731
6 votes
2 answers
2k views

Unusual error when I try to sfdx force:source:convert

I'm using the exact same methodology and commands I've used dozens of times, and now I'm getting an error. VS Code, latest version; sfdx extensions, latest versions. I want to convert my source to ...
PatMcClellan__c's user avatar
5 votes
2 answers
3k views

Convert Lead on Update trigger

anybody know how to convert a lead on update? It is for if the lead Email matches an existing Contact's email. I can get it to work on after insert, but when I try on update(before update or after ...
JayDP123's user avatar
  • 137
5 votes
0 answers
3k views

Use Reports API to get report results as CSV

Using the Reports and Dashboards API is there a way to convert report results to CSV? Reports.ReportResults results = Reports.ReportManager.runReport(reportId, true); Map<String, Reports....
Mossi's user avatar
  • 3,996
4 votes
2 answers
2k views

Convert different Date Formats into Date based on User locale

I am getting different formats of date formats in date field from Json as a string. I should be able to convert any Date format into Date based on user locale.below are the example of formats. Ex: "...
chandu's user avatar
  • 43
4 votes
2 answers
2k views

Is there a way to hide/disable standard Salesforce button clicked

Is there a way to stop standard Salesforce button being clicked? in the Lead page I have a standard button called "Convert" I want the user to stop clicking until the Lead is in certain stage, I'm ...
Nick's user avatar
  • 7,113
4 votes
1 answer
1k views

Autopopulate Custom field when Lead is converting

When I am converting Lead I wants to auto populate field before lead is converting screen. In Lead I am have custom field named "Campaign name" and In task section I have created custom field named "...
Salesforce's user avatar
3 votes
1 answer
2k views

Excel to UTF-8 encoded CSV [closed]

How can one convert an Excel file into a UTF-8 encoded CSV?
Dudekula Guruvamsi's user avatar
3 votes
1 answer
475 views

How to stop converting Lead to Account in trigger without addError() method

I would like to know how to stop converting Lead to Account in before insert trigger without addError() method? To be more precise I try to achieve the following: 1. Stop the process of converting ...
Dylan D's user avatar
  • 568
3 votes
1 answer
3k views

How to get the account Id thanks to the lead's Id after the lead conversion?

After a lead conversion, I have to redirect the user to a Visualforce page (saveUrl on the URL) to examine some fields of the account to redirect the user then (depend of the values of the account ...
Oupat's user avatar
  • 731
3 votes
1 answer
2k views

Lead Conversion- sometimes merges with existing contact and sometimes doesn't..why?

Sometimes when my users are converting leads, after they click "Convert", it will bring up another screen asking if we want to merge the lead with an existing contact. This is not consistent and ...
Olivia Salvatore-King's user avatar
2 votes
1 answer
797 views

Magic Mover Conversion Tool

I installed the Magic Mover conversion tool. We're looking to convert in sandboxes first then convert our production environment. I tested 1 record in our partial sandbox. Magic mover worked just fine....
SalesforceAdminKanova's user avatar
2 votes
1 answer
401 views

Custom button to open opportunity after lead is converted

I have a global class that creates an Opp from a custom lead conversion button. The problem is that the button works to convert the lead to an Opp but it does not open the Opp. I get an error message ...
Melissa Lenai's user avatar
1 vote
1 answer
593 views

Convert integer to a binary value [closed]

I want to display the given number in binary format. For example 78 -> 1001110
ilaydas's user avatar
  • 11
1 vote
3 answers
3k views

Convert json string of datetime to a date

I have the following value coming through from a json payload, I need to convert it to a date value in Salesforce. The json body contains this: "ExpiryDate":"/Date(1617145200000+0100)/" When I ...
dacology's user avatar
  • 2,992
1 vote
3 answers
2k views

I would like to do Validation on Lead fields before the 'Convert' button is clicked

So, we have several lead fields, that are only needed upon conversion. There are fields mappings for these fields, which populate correctly on the account/oppty new/converted records. However, they ...
Saariko's user avatar
  • 5,630
1 vote
1 answer
7k views

Convert String array to Set of string in apex class

Can someone please help me to convert String array values to Set of string? I have below code where it says Set is not getting populated from string array. Criteria=[SELECT Franchise__c FROM ...
Testing_SFDC's user avatar
  • 2,950
1 vote
2 answers
575 views

Convert a number picklist to date field & send email on that date before

I have a picklist with values from 1 to 31.It corresponds to the date. My requirement is to convert this number selected to a date. Lets say the number selected is 20 then it has to correspond to 20th ...
Sowparnika's user avatar
1 vote
1 answer
2k views

Convert to DateTime, without also converting to GMT?

We have incoming JSON from one of our client using REST API. The JSON they send has a timestamp value as a String like this "timestamp": "2017-01-11 19:23:27 CST". CST here being China Standard Time ...
Win4frndz's user avatar
1 vote
1 answer
3k views

How to find the original lead after it has been converted into an opportunity?

I've asked a similar question recently and got the answer I was looking for but still have a bit of a predicament. In the call centre, agents take calls from technicians who sell new business to ...
Paul Rogers's user avatar
1 vote
1 answer
3k views

Trigger for Converting Amount(Currency/Number) to Words

Has anyone else come up with a solution by Trigger for this? I have been trying to figure this out for a few weeks now but to no avail. for e.g Amount - 200$ Amount in words - Two hundred ...
mohammed azarudeen's user avatar
1 vote
1 answer
393 views

Data Extract activity is changing the physical order of records

I have the next issue when exporting a CSV file to a SFTP location: It's about a daily automation, the process consists in three steps, one for data extract, a second one to convert the file to UTF8 ...
Alexandru Ciobanu's user avatar
1 vote
1 answer
2k views

CONVERT button not showing in Lead tab in Lightning experience

I have added the Convert button in the Mobile & Lightning Actions and it is still not showing in the Lightning experience but it is in Classic
Julianne Matzell's user avatar
1 vote
1 answer
2k views

Query Studio - Could not convert date and/or time from string data type

On one data extension, I have a DateIn field modeled as text. The value can be in one of the two formats like: 2015-06-23 16:12:04.703 8/6/2018 11:46:59 AM When I cast the field to date and use it ...
SFMC SQL's user avatar
1 vote
2 answers
157 views

Is there a size limit in performing sfdx force:mdapi:convert?

I am attempting to convert a large src directory in mdapi format into source format. When I run "the sfdx force:mdapi:convert -r directoryToBeConverted -d directoryToCaptureConversion --loglevel ...
jschleicher's user avatar
1 vote
1 answer
1k views

Convert Lead button working in Lightning and Sandbox but not Classic

The Convert Lead button has suddenly stopped working in Classic. The button is on the lead page but when clicked nothing happens. No changes have been made to permissions and I've rechecked them all. ...
GeorgieR's user avatar
1 vote
0 answers
240 views

Cannot convert unconverted lead

When trying to convert a lead which hasn't been converted I get one of the two following errors: Error: System.DmlException: Update failed. First exception on row 0 with id 00QN0000005zrQtMAI; ...
VaroutSP's user avatar
  • 361
1 vote
0 answers
60 views

Map Url field via Object Converter

Could you please advise how to make a map between two fields by using the Object Converter. Here is what I need to achieve http://postimg.org/image/kzhf2h28p/ Unfortunately the Applicants Website(s) ...
Dylan D's user avatar
  • 568
1 vote
0 answers
47 views

Adding a time to datetime

I need some help correcting the time when doing a datetime convert. Currently when running the script below I get a time of 12:00AM - I need it to state 8:03AM SELECT [custcode],[customername],[...
chrisishka's user avatar
0 votes
2 answers
5k views

System.JSONException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')

public class CurrencyConvertorClass { public static Decimal convertCurrencyToINR(Decimal eur){ Decimal inr = 0.0; HTTP h = new HTTP(); HTTPRequest req = new ...
MD Faizan's user avatar
0 votes
1 answer
2k views

What is the simplest way to cast a Map<Object, List<SObject>>?

I'm trying to find the most simple way to cast a map<Object, List<Sobject>> in any other type like, String, Integer and etc.. Anyone knows how to do this? This is my code Map<Object, ...
Matheus Coelho Campos's user avatar
0 votes
2 answers
3k views

Remove time stamp from the date

I want assign a date value into a WHERE clause of query This is my date Date myDate = System.Today().AddDays(Integer.valueOf(Deal_Expiration_Batch_Settings__c.getInstance()....
JURY's user avatar
  • 183
0 votes
1 answer
3k views

Convert string to list of String in Apex

I have string value : String x = '(My, Test Value, New Other, Value)'; Expected outcome or expected list of string is : list<string> NewList = new list<string>{'My, Test Value','New Other,...
Maverick's user avatar
0 votes
1 answer
384 views

Assign queried Decimal to a Decimal variable

question - want to use a number field called Rebate_Amount__c on object called Rebate_schedule__c (child to Opportunity) to cut a rebate on the Amount__c field on a Revenue_schedule_Summary_Amount__c ...
jaw999's user avatar
  • 1,317
0 votes
1 answer
5k views

Convert JavaScript button for lightning!

I have a JavaScript button which works fine in classic but doesn't show up in lightning, my guess that JavaScript buttons are not supported in lightning, I couldn't convert it using the converter ...
Roody's user avatar
  • 49
0 votes
2 answers
4k views

Convert a datetime to date in SFMC

I have an issue converting a date/time to a string format date. Indeed, I would like to change the following date format : 'mardi 15 mars 2022 4:24 PM' to this format '15/03/2022' without the timedate....
LT888's user avatar
  • 29
0 votes
1 answer
4k views

How to convert UTC to IST conversion in apex?

I am getting the time as string like "client_modified": "2020-02-04T11:27:34Z" How can I convert this to local time zone, Update: I am getting this time from api response I need to display it in ...
Ajith Kumar's user avatar
0 votes
1 answer
2k views

Lead Source Gone after converting "Lead" to "Contact"

I am having some trouble keeping the lead source. For some odd reason when I am converting a lead into a Contact/Account the lead source that originally came with the lead seems to disappear. Then I ...
Alias311's user avatar
  • 399
0 votes
1 answer
2k views

Convert date in Marketing Cloud

I need a help to change the format of a date MM/dd /yyyy to dd/mm/yyyy I tried this: Works! Now: %%=Format(Now(),"MM/dd/yyyy")=%% Does not work! Date of Vestibular: %%=Format(%%Date Vestibular%%, ...
Coronel's user avatar
  • 41
0 votes
1 answer
219 views

How to convert List<sObject> to List<InnerClass>

I have a @InvocableMethod that is used from Flow builder to create a record. Also I have a inner class with @invocableVariable. It is working fine, but I want to use the same method from another class ...
M.ho's user avatar
  • 5
0 votes
1 answer
702 views

I can't convert my Master-Detail field to a Lookup field because the Change Field Type button is not visible

I have deleted all Roll-up Summary fields in the Master object including those in the Deleted Fields but the Change Field Type button is still not showing. Do you have any idea what I can do?
Max's user avatar
  • 101
0 votes
1 answer
1k views

Wrong date when converting datetime value to date field

I am using the REST API for creating a new Task record, including an Activity Date in the format YYYY-MM-DDThh:mm:ssZ. My current timezone is UTC+1. When submitting a date in the first hour of the ...
stan's user avatar
  • 71
0 votes
1 answer
537 views

Populate custom Leads fields to Assets fields on 'convert'

My company wants to gather the client's assets at the lead stage and automatically populate the assets page of the account once the lead gets converted. The same assets fields currently exist as ...
TheAdmin's user avatar
  • 355
0 votes
1 answer
211 views

Convert Leads Trigger Strange OwnerId Behavior

I have some code that automatically converts leads when certain conditions are met using the convertLead() method. This process is fairly well-documented in threads such as this: Convert Lead on ...
Todd Sprinkel's user avatar
0 votes
1 answer
1k views

Add an String value to a Integer SelectOption list - convert String to Integer

I got the following list of integer SelectOptions, and I want to add a String value to the SelectOption list. How can I convert String to Integer to add the String value? 'recordLimit' is an integer ...
Tinkerbell's user avatar
0 votes
0 answers
41 views

Apex AutoConvert

I am not a pro with Apex and was able to find code that would autoconvert leads which is working well. Now I've been asked to have the autoconverted Accounts have a specific owner assigned. I ...
Grace's user avatar
  • 11
0 votes
0 answers
746 views

Converting text to number

I am trying to create a new field and convert a text to a number but am getting this error (Error: text__c may not be used in this type of formula) when using this formula (Value(text__c)). The ...
Vicky's user avatar
  • 1
0 votes
0 answers
216 views

Milliseconds issue, how convert 00h to 24, 01h to 25, 02h to 26..?

I have a LWC component that is a calendar, he verify the begin and end time of the company to put the interval of this hours, the problem is, when the hour is 00 or 01 or 02.. because of the way that ...
Alexia's user avatar
  • 83
0 votes
0 answers
113 views

How do I put a DATE type value in a String field in a Marketing Cloud data extension

I'm trying to do this sql query, but I'm getting an error when converting the type date to string.... I've tried using CAST/ CONVERT/ TRYCAST .. but I must be doing something around because Marketing ...
Thais Carolyne Souza's user avatar