• Jon Snow
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 12
    Replies
Hello,
I have this errore while trying to deploy from the sand box to the production (no error in SB).
I'm setting up a new community with simple portal community licence (role are disable in this licence) and i'm fetching a existing user as the account owner :

adminProfile = [SELECT Id FROM Profile WHERE Name IN ('Administrateur système', 'System Administrator')].Id;
roleId = [SELECT Id FROM UserRole WHERE Name ='XXXX' ].Id;
List <User> ownerpossible = [SELECT Id, Name FROM User WHERE IsActive = True AND UserRoleId =:roleId AND ProfileId= :adminProfile LIMIT 1];

Any idea ?
(I've try this method http://blog.jeffdouglas.com/2010/09/02/error-portal-account-owner-must-have-a-role/ but the user doesn't have a role either)
thx
I am having a visualforce page which is rendered inside salesforce1 app and I am unable to scroll the page.

does any one have any pointers for ficing the issue or anything that is restricting the page from scrolling inside salesforce1 app?
  • September 09, 2014
  • Like
  • 0
お世話になります。初めて投稿させて頂きます。

テキスト型のカスタム項目を自動採番型に変更すると、テキスト型のときに入力していた値がクリアされてしまいますが、
クリアされない方法、または、自動採番型に変更したあとに上書きをする方法はございますでしょうか?

どなたかご教示いただけますと幸いです。どうぞよろしくお願いいたします。
  • September 09, 2014
  • Like
  • 0
大変お世話になっております。t.ishibuchiと申します。

本番環境にアップロードしたCSSファイルがブラウザで正常に読み込まれない、という事象が発生しました。

その原因・対策について、ご助言頂けましたら幸いでございます。


**************************************
▼事象
VFページから静的リソース上のCSSファイルを読み込むようにしております。
また、Force.com サイトにてそのページを公開しています。

先日(2014/9/2)そのCSSを編集し、リリースを行った際に、
本番環境にアップロードされた該当のCSSファイルがブラウザで読み込まれておらず、
それが原因でSandbox環境と比べて画面レイアウトが崩れてしまうという事象が発生しました。

なお、アクセスしたデバイスによってCSSを切り替えるように、
VFには以下のように実装しています。

--VFページ-------------------------------------------------------------------

<script type="text/javascript">
    <!-- css切り替え -->
    (function(){
        var device = navigator.userAgent;
        if((device.indexOf('iPhone') > 0 && device.indexOf('iPad') == -1) || device.indexOf('iPod') > 0 || device.indexOf('Android') > 0){
            document.write('<link class="user" href="/resource/css_sp" rel="stylesheet" type="text/css" />');
        }
        else{
            document.write('<link class="user" href="/resource/css_pc" rel="stylesheet" type="text/css" />');
        }
    })();
</script>

----------------------------------------------------------------------------


**************************************
▼対応
CSSファイル名称を変更して新規に作成し(中身は同一)、該当の画面でそのファイルを読み込むように修正をしたところ、思惑通りの画面レイアウトが正常に表示されました。

なお、上記VF内記載のスクリプトは、以下のように修正し、新規のCSSを呼び出すようにしました。
(CSSファイルは、「css_pc.css」をコピーし、名称を「css_pc_20140903.css」に変更してアップロードしています。「css_sp.css」も同様)

--VFページ-------------------------------------------------------------------

document.write('<link class="user" href="/resource/css_pc" rel="stylesheet" type="text/css" />');

↓修正↓

document.write('<link class="user" href="/resource/css_pc_20140903" rel="stylesheet" type="text/css" />');

----------------------------------------------------------------------------


**************************************
▼望ましい動作
上記対応を行わなくとも(同名のCSSファイルを更新してリリースしただけで)、本番環境にリリースした最新のCSSが読み込まれることが望ましい動作です。


**************************************


あくまで推測ですが、キャッシュサーバ上にあった、古いCSSが読み込まれていた為、レイアウト崩れが発生していたのでは?と思いました。

因みにですが、Sandbox環境のCSSを更新した場合は即座にそのCSSが読み込まれますし、
本番環境においても今回のリリース時に初めて、最新のリリースしたCSSが読み込まれないという事象が発生しました。

もし本事象の原因およびその対策につきまして、お分かりになる方いらっしゃいましたらご教示頂けますでしょうか。
I'm working on creating a managed package. In my managed package, there is a global virtual class and a method defined. I installed the beta version of package to a test organization and created an another class which is inherited from the package class. In this class I overriden the method.
e.g. Package class:
global class ManagedPackageInheritance { 
    global virtual class VirtualClass {
        global virtual void foo () {
            System.debug('#Foo from Managed Package !');
        }
    }
}

Inherited apex class in test org:
global class PlayVirtualInheritance extends namespace.ManagedPackageInheritance.VirtualClass {
   // override the virtual method
   global override void foo() {
        super.foo();
        System.debug('#Foo from Target Org !');
    }
}

So my question is, while calling the method 'foo', I want to pass the class instance name as a parameter. Something like this:

global class clsInvoke{
        public void invokeFoo(String className)       ///namespace.ManagedPackageInheritance.VirtualClass OR PlayVirtualInheritance
        {
                  //here call method foo() from the either class depending on the class name passed
        }
}

I think I need to use 'Type' class methods. But not sure how? I want to do this, because suppose the client/customer who has installed our package does not want the functionality provided by us, and they want to implement their own functionality. So the client will inherit our class and override the method. And then there is no need to modify the method invokation part.

Can anyone help me in this?
Can someone explain these two REST sObjects - maybe with an example?

In the documentation it lists these as sObjects, but when I try and invoke it using:

/services/data/v29.0/tooling/sobjects/ApexCodeCoverage/{id}   (where {id} is the ID of an Apex class)

I receive:

[{"message":"The requested resource does not exist","errorCode":"NOT_FOUND"}]; HTTP Status: 404

Also, in the documentation for ApexCodeCoverage, under Usage, it lists some SOQL queries.  So I'm confused - do you invoke the REST resource or invoke the query resource?
Hi,

Is there a way to export the objects' field definition (name, label, type, length etc...) to xls?

Thanks,
Terry

お世話になります。

 

連動選択リストについて質問です。

 

カスタムオブジェクト①、②があります。

カスタムオブジェクト①に選択リストが2つあり、その2つは互い連動しています。(選択リスト②が選択リスト①に連動)

 

「カスタムオブジェクト②に新規レコードが作成(削除)されると、そのレコード名がカスタムオブジェクト①の選択リスト②の選択枝として追加(削除)される」ということは

可能でしょうか。

 

どうそ、宜しくお願い致します。

 

 

 

 

 

Metadata APIにて、リストビューの設定内容を取得したいと考えております。

その場合のMetadata APIにてObjectのMetadataを取得する方法を教えていただけないでしょうか。

 

SOAPでのRequest、もしくは、どのようにやっているのでしょうか。 

 

Hi,

 

I have two types of addresses on my opportunity object like (billing,shipping). i want to display these two type of adresses in following way.

 

              street  country  zip

Billing:

 

Shipping:

 

 

Please give me suggestions to acheive this.

 

  • August 31, 2009
  • Like
  • 0