• Magnetism
  • NEWBIE
  • 20 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 7
    Replies
Disable a button onClick that calls javascript function from where @RemoteAction method in apex Controller is invoked

I am trying to disable a button on meeting a condition. This <Button> helps me invoke a RemoteAction function in VF Controller. Need help in doing this. suggestion and solutions are appreciated.
Thanks

Note: This is not apex command button
I have three fields I am currently trying to get results on and after that I am going to implement the same methods to work on the rest of the fields. So, I have two picklist fields of single selects and a inputcheckbox. I am calling the RemoteAction method in controller from javascript to get the user selected values back to the controller. From there I will get use those values to do some dml operations. So, for the two picklist fields, I am able to get the values back to controller in the form of the Id's. But for the inputcheckbox the value is returning to be false even though it is selected. And another thing I noticed was, when I alert({!inputcheckbox}); value in the page, the same field value returns "on". I am looking for some help. I greatly appreciate it.
I debugged a collection type List in the apex and I am expecting to see a total of 20 elements in that list. But I can see only 10 and after the 10th element there are few dots(.......) meaning that there are other elements but those are not displyed. how to view those elements as well,

Thanks.
I am trying to crate a field on a custom object B and trying to populate that with a custom field value on Account object. that field on Account is a look up on the user object. I am using a trigger to do this, help needed to know how to relate these object records to assign the value to the auto populate field. Also what would be the best type to create this field type to be?
Disable a button onClick that calls javascript function from where @RemoteAction method in apex Controller is invoked

I am trying to disable a button on meeting a condition. This <Button> helps me invoke a RemoteAction function in VF Controller. Need help in doing this. suggestion and solutions are appreciated.
Thanks

Note: This is not apex command button
I have three fields I am currently trying to get results on and after that I am going to implement the same methods to work on the rest of the fields. So, I have two picklist fields of single selects and a inputcheckbox. I am calling the RemoteAction method in controller from javascript to get the user selected values back to the controller. From there I will get use those values to do some dml operations. So, for the two picklist fields, I am able to get the values back to controller in the form of the Id's. But for the inputcheckbox the value is returning to be false even though it is selected. And another thing I noticed was, when I alert({!inputcheckbox}); value in the page, the same field value returns "on". I am looking for some help. I greatly appreciate it.
I debugged a collection type List in the apex and I am expecting to see a total of 20 elements in that list. But I can see only 10 and after the 10th element there are few dots(.......) meaning that there are other elements but those are not displyed. how to view those elements as well,

Thanks.
Hi,

 I want to store below visualforce code inside controller based on the selection is made .

VisualForce
<apex:pageBlockSectionItem >
   <apex:outputLabel value="Expiry Term:" for="expireterm"/>
   <apex:selectList value="{!ExpireTerms}" multiselect="false" size="1" id="expterms" readonly="true">
                <apex:selectOption itemValue="1" itemLabel="1 Year"/>
                <apex:selectOption itemValue="3" itemLabel="3 Year"/>
                <apex:selectOption itemValue="5" itemLabel="5 Year"/>
    </apex:selectList>
   </apex:pageBlockSectionItem> 

<apex:pageBlockSectionItem >
   <apex:outputLabel value="Expiry Term:" for="expireterm"/>
   <apex:selectList value="{!ExpireTerms}" multiselect="false" size="1" id="expterms" readonly="true">
                <apex:selectOption itemValue="1" itemLabel="1 Year"/>
                <apex:selectOption itemValue="3" itemLabel="3 Year"/>
                <apex:selectOption itemValue="5" itemLabel="5 Year"/>
    </apex:selectList>
   </apex:pageBlockSectionItem> 


Please suggest me.

Thanks
Sudhir

Hello.  In unit tests, is there a specific way of creating completed tasks so that they appear immediately in the ActivityHistory read-only object?   See code snippet below.  When I run the unit test, the activity history is empty.  However, when I create completed tasks manually in the UI, the ActivityHistory is populated.

Account acct = new Account(Name = 'Apex Test');
insert acct;

Task tsk1 = new Task(WhatId = acct.Id, Subject = 'Email: apex test', ActivityDate = date.today(), Status = 'Completed');
Task tsk2 = new Task(WhatId = acct.Id, Subject = 'Call: apex test', ActivityDate = date.today(), Status = 'Completed');
Task tsk3 = new Task(WhatId = acct.Id, Subject = 'Email: apex test', ActivityDate = date.today().addYears(-2), Status = 'Completed');
Task[] tskList = new List<Task>{ tsk1, tsk2, tsk3 };
insert tskList;

Account result = [select Id (SELECT ActivityDate, Subject FROM ActivityHistories) from Account where Id = :acct.Id];

In my current project I would like to hook my program up to Salesforce to automatically insert activity records into SalesForce. However, the API does not seem to support the create / upsert method for this type of object http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_activityhistory.htm.

I'd rather do this than be forced to just insert generic notes, so does anyone know another way to do this, or at least have a reason why you cannot create new activity history outside of SalesForce?

We have a VF page that is used to override the View for the Account object. When we setup the Console view and open the details of an account, the page is displayed properly. However, when we click on a related object in the account detail (such as Account Cases), then the right side does not show up. Firebug shows the following javascript error:

 

 

Permission denied for <https://namespace.na7.visual.force.com>

to get property Window.srcFromMain from <https://na7.salesforce.com>.
[Break on this error] if (window.parent && window.parent.srcFromMain) {

 

 

This javascript function is in desktopMain.js:

function srcUp(url) {
if (window.parent && window.parent.srcFromMain) {
window.parent.srcFromMain(url);
 } else {
 srcSelf(url);
 }

 

 

 

It seems that the VF page is in a different domain then the frame set and this is causing a security issue with the javascript. Is there a workaround or solution for this issue?