• T.Aizawa
  • NEWBIE
  • 25 Points
  • Member since 2013

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 5
    Replies

本当に初歩的な質問なのですが、マニュアル等を読んでもよくわかりません。どなたか教えてください。

画面Aで日付けを指定すると、画面BでPDFを出力するPGを組んでいます。

 

ここで画面Aで指定した日付けを画面Bで受け取るにはどうすればいいのでしょうか?

 

本当に初歩的ですみません。教えてください

I have a page redirect/Save controller and need help wrighting a test class for it.  I have 19% covered right now and need 100%

 

Any help would be appriciated

Niki

 

Controller and Test:

public class mywebLeadController {
    Lead lead;

    public Lead getLead() {
        if(lead == null) lead = new Lead();
        return lead;
    }

    public PageReference savelead() {
        // Add the lead to the database. 
        insert lead;
        
        // Send the user to the landing page for the new lead.
        PageReference leadPage = page.WebLeadLandingPage;
        leadPage.setRedirect(true);
        return leadPage;
    }
    
   
   
    @IsTest static void testSave() { 
            
    Lead lead = new Lead ();
    mywebLeadController pjae = new mywebLeadController (); 
            
    Lead.FirstName = 'Test';
    Lead.LastName = 'Test';
    Lead.Company = 'OTJ - NG';
    Lead.Email = 'test@otj.com';
    
    insert lead;
    
    PageReference leadPage = page.WebLeadLandingPage;
    leadPage.setRedirect(true);
    
    System.debug('the current page is...' +ApexPages.currentPage() );
       
    
    }
}//End

 

Hi,

I have a problem while using relational query. I have Created tow objects one is master "Book" and other is "Details" which is child of "Book" object.

I am trying to fetch data from both objects by using relational query but its not getting compliled successfully. Please if any one could help me regarding this issue. Here is my query and error message given below:

Query : [select id, Name, Price__c,(SELECT Color FROM Details__r) FROM Book__c ];

 

Error:Error: Compile Error: Didn't understand relationship 'Details__r' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names. at line 20 column 18


Please guide me if someone can ...!

Thanks in Advance....

本当に初歩的な質問なのですが、マニュアル等を読んでもよくわかりません。どなたか教えてください。

画面Aで日付けを指定すると、画面BでPDFを出力するPGを組んでいます。

 

ここで画面Aで指定した日付けを画面Bで受け取るにはどうすればいいのでしょうか?

 

本当に初歩的ですみません。教えてください

権限制御とSOQLに関して質問します。

 

①オブジェクトが2つある

   OBJA=参照

   OBJB=参照・登録・更新・削除

 

②OBJBにはOBJAへの主従関係がある

 

で指定している場合に、

OBJBのトリガーで、Trigger.New(n).Relation__r.OBJA.Text__c;

と取得すると値が取得できません。

 

ですので、代替策として、

String tx = [Select Text__c From OBJA Where OBJA.Id = :Trigger.New(n).Relation__c];

のような形での取得を試みたのですが、

上記形式で取得するとOBJAの編集権限が必要になってしまいます。

 

ですので、SOQLの発行時に、読み取り専用で取得する方法があればお教えください。

 

以上、よろしくお願いします。

 

  • December 21, 2012
  • Like
  • 0