• Shubham Jadhav 70
  • NEWBIE
  • 0 Points
  • Member since 2023

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 8
    Replies
Hello, 

I have added a static resource for custom fonts in .woff format. I am using the static resource in my lightning web compnent in the css file with the following

component.css
@font-face {
    font-family: 'CustomFont';
    src: url('/resource/CustomFont') format('woff');
}

This works perfectly fine when I am working in my development organization. But the issue is when I create a managed beta package and include the component and static resource. 

Once I upload the package and install it in a separate test org, the component is no longer able to find the custom font / static resource. I receive the following error in the browser developer console on Google Chrome
 
GET https://companytestorg.lightning.force.com/resource/CustomFont net::ERR_ABORTED 404 (Not Found)

Can I get some guidance on what I am missing here when it comes to using a static resource custom font in an installed managed package? Thank you!
 
Hi,

We have been facing a problem with the refresh token flow. 
From time to time, we are getting a bad request response (HTTP Status code 400) when requesting a new token. This problem goes away if we execute 2 or 3 more times this request.
We are using the "Refresh token is valid until revoked" setting, so we can make sure we don't have any problems with this mechanism.

This is the request we are performing:
POST /services/oauth2/token HTTP/1.1 Host: login.salesforce.com/ grant_type=refresh_token& client_id=<client_id>&client_secret=<client_secret>&refresh_token=<refresh_token>
Could you help me understand if there is any configuration missing?


 
  • November 11, 2020
  • Like
  • 0
I created a Connected App and I set the permitted users to self-authorized.

After trying to get the access token via the curl command, I keep getting the error: {"error":"invalid_grant","error_description":"authentication failure"}

I also requested a new security token. Please note this process worked with my employee email but it isn't working with a service account, if that helps.

In the Connected App there is an Initial Access Token and a Generate button for it.


The description for the field is as such :

Generate an initial access token for an org’s parent OAuth 2.0 client app. 
Salesforce requires this token to authenticate the client app’s request 
at the dynamic client registration endpoint.


In the online documenation this is written about that token :

After generating the initial access token, register it 
with your external API gateway.

How\where do I "register" that access token ?
Here is the full documenation I am referencing :

Generate an Initial Access Token (https://help.salesforce.com/articleView?id=remoteaccess_oidc_initial_access_token.htm&type=5)

Thank you for any input you can provide.

I am trying to insert a record from developer console for object 'TestTriggers__c'. The record is failing to insert as expected because I am not passing the required field 'Amount__c'. I need to, however, catch this in my trigger, which i am unable to. I can see the error 'System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Amount__c]: [Amount__c]' in the debug log, but unable to catch it within my trigger 'TestTriggers'. Is there any way to do that. I need to use the same approach to catch the errors from different integrations (like data loader) we have in our SF instance.
Hi all,
I am testing receiving the authentication token for my connected app so i can continue to build a simple consoleapp for salesforce.As a new developer of salesforce, I am having issues with testing Oauth through postman. 
User-added image
I followed this guide here https://blog.mkorman.uk/using-postman-to-explore-salesforce-restful-web-services/ , but to no avail. 
When i click "request token", the salesforce login appears, however when i input my UN and PW i am given an error message reading
"Could not complete OAuth2.0 login"

I've also tried this way, and recieve an invalid_grant error, and have tried every body configuration.
User-added image

Could someone point me in the right direction? I'd appreciate any help/tips. Thanks in advance!

I have a before insert and update trigger that updates the account.ownerid based on criteria that is met by matching the account.billing state to zone.state__c custom object. I created a try catch block to catch and exception and throw the error to a custom errorlog object.  But it doesn't  seem to catch it. Is this because a query exception is not considered a dml exception? alsoi have A method called getNumDMl(), does this method count all exceptions or just dml ones? I want to basically catch as many exceptions as possible and throw to error log. any advice would be great

 

catch (QueryException e)
{
Error_Log__c eLog = new Error_Log__c();
List<Error_Log__c> eLogList = new List<Error_Log__c>();
for (Integer iex = 0; iex < e.getNumDml(); iex++)
{
eLog.Description__c = e.getDmlMessage(iex);
eLogList.add(eLog);
}
insert eLogList;
}

  • September 29, 2012
  • Like
  • 0

I am trying to use a custom font (for info, Garamond) in a Visualforce page. Following some research, I have found that it might be possible to upload the font file as a static resource, and refer to it in the page.

 

However, I don't seem to be able to find much about the detail of how this works. So:

 

  • Firstly, is this possible?
  • If so, in what format do I need to upload the font file? TTF? Zipped TTF? Other Font file?
  • Lastly, how do I reference the font in the Visualforce page? In other words, what would I put in the blank:
body {
font-family: _________;
}

 

Thanks for any help.