• Petr Chvala
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
I'm trying to update CustomObjectTranslation components with a callout to the Metadata API through Apex and I have been able to accomplish the task for my own custom objects and managed fields from standard objects. The problem is when trying to update those custom objects that come from a managed package. When list the Metadata I can see those components there, but seems like when I try to read them it doesn't returns anything, with or without namespace, I think I've tried everything.

I'm starting to think it's just not possible to read a managed CustomObjectTranslation, although I have no problem when doing the same with CustomObject or CustomField, It's just the translations from managed custom objects that I'm not able to update.
I've been searching the net without success for the last week. Hope somebody knows what I'm doing wrong or just if it can tell me that it's just not possible to do (although if that's the case retrieving that same component with a tool like Ant shouldn't work either and it does).
Objects with a single layer work fine, but when I try to use an object that goes deeper than one layer I receive an unknown server error when trying to access the variable on the server side user parameter.get('objectPropertyName') see code below.

So this code works as gateway is a simple string. However whenever I try to make gateway an object I start getting errors
       /*******************************************************************************************************
        * @description Test saving configuration
        */
        var saveConfiguration = component.get("c.testSomething");

        // Set save configuration parameters.
        saveConfiguration.setParams({
            testSome : 'Hello World!',
            config : {
                gateway: 'Stripe'
            }
        });

        // Setup save configuration callback
        saveConfiguration.setCallback(this, function(a) {
                if (a.getState() === "SUCCESS") {
                   // Do something with return value
                } else if (a.getState() === "ERROR") {
                    $A.error("Errors", a.getError());
                    $A.log("Errors", a.getError());
                }
            });

        // Queue the transaction action
        $A.enqueueAction(saveConfiguration);



This code gives me an error when trying to access the parameter map in the server side controller. 
       /*******************************************************************************************************
        * @description Test saving configuration
        */
        var saveConfiguration = component.get("c.testSomething");

        // Set save configuration parameters.
        saveConfiguration.setParams({
            testSome : 'Hello World!',
            config : {
                gateway: 'Stripe'
            }
        });

        // Setup save configuration callback
        saveConfiguration.setCallback(this, function(a) {
                if (a.getState() === "SUCCESS") {
                   // Do something with return value
                } else if (a.getState() === "ERROR") {
                    $A.error("Errors", a.getError());
                    $A.log("Errors", a.getError());
                }
            });

        // Queue the transaction action
        $A.enqueueAction(saveConfiguration);




Here's my server side controller method:
@AuraEnabled
public static void testSomething(String testSome, Map<String, Object> config) {
    System.debug(config.get('gateway'));
}

So in summary whenever gateway is a simple string everything works... The second I try to use an object I start getting errors. I'd prefer to use one of my Apex classes instead of a Map<String, Object> for the parameter, but I was having no luck with that. Any help is much appreciated!
 

Hello everybody,

 

while trying to render a page as .pdf, I tried to use font-family: Arial Unicode MS with font-weight: bold.

That did not work. So I did first things first: google told me that it is simply not possible to do that.

 

Ofcourse I also used SF.com documentation and found this:

 

http://www.salesforce.com/us/developer/docs/pages/Content/pages_quick_start_renderas_pdf.htm

 

So, Arial Unicode MS with font-weight: bold is used right in the doc. So what am I doing wrong, it is absolutely not working for me.

 

body {
            font-family:Arial Unicode MS;
            font-weight:bold;    
     }   

// First way I tried it 

body {
            font-family:Arial Unicode MS;  
     }                   
            
div.content {
            font-weight:bold;    
     }   

// Second way I tried