• MMN
  • NEWBIE
  • 0 Points
  • Member since 2012

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

Hi

 

I'm really new working on SF so I have some troubles doing that. If I had to do that in JS and HTML it would be really easier ^^

 

As I said, I'm working with Cases. I have to update a field called "Contact Name" (lookup) as soon as I complete the "Account Name" field, doing a SOQL query.

Problem is I don't know how to do that.

 

At first, I hope that I could be able to do that without overwrite the "New" button, using Formula or something else.

 

Finally, I had to overwrite the "New" button. But now my VF page is done, I don't know how to update field A when field B is completed ... I tried using JS or Apex/reRender method.

 

Here is the minimal code :

 

<apex:page standardController="Case" tabStyle="Case">
	<apex:form>
		<apex:pageBlock title="" mode="edit">
			<apex:pageBlockSection columns="2" title="My title">
				<apex:pageBlockSectionItem>
					<apex:outputLabel
						value="{!$ObjectType.Case.fields.Account_Name__c.label}"
						for="Account_Name__c" />
					<apex:inputField id="Account_Name__c" value="{!Case.AccountId}"
						required="true" />
				</apex:pageBlockSectionItem>
				<apex:pageBlockSectionItem>
					<apex:outputLabel
						value="{!$ObjectType.Case.fields.ContactId.label}" for="Contact" />
					<apex:inputField id="Contact" value="{!Case.ContactId}" />
				</apex:pageBlockSectionItem>
			</apex:pageBlockSection>
		</apex:pageBlock>
	</apex:form>
</apex:page>

 

 

By the way, excuse if my english is approximative, that's not my native language, but I'm working on it ^^

  • October 03, 2012
  • Like
  • 0

 

Is there any way I can pass Account Ids in the below link for merging account using APEX?

 

This is the link for Account Merging two accounts.

 

p = new pagereference('https://cs8.salesforce.com/merge/accmergewizard.jsp?goNext=+Next+&cid=001L0000005T4bK&cid=001L0000005T4bo')

How can I pass two cids dynamically in the above URL?

When I tried it using two variables to pass I got this result

https://cs8.salesforce.com/merge/accmergewizard.jsp?cid=001L0000005T4bK&goNext=+Next+

 

 Appreciate any help on this.

 

 How can I

 

Hi,

 

My Controller code is

 

@RemoteAction
    global static void getAttachment(List<String> IdList1){
        
         system.debug('IdList--'+IdList1);
         //IdList.addAll(IdList1);        
        
        List<Attachment> atList = [Select Id,Name,ParentId from Attachment where Id IN: IDList1];
        //attList.addAll(atList);
        
    }

 

how do i invoke this method from js.

 

Thanks in advance