You need to sign in to do that
Don't have an account?
Mary Ardelyn Nabong
How to get Standard fields using custom button and Javascript
Hi,
On the Order object I have a requirement to create custom button to check if the custom field(check box) in object Account object is check or not. Can I do this using Javascript only if yes, can anybody show me? if no and i need to do a VF and controller on this please let me know
Example of displaying custom field in an order:
alert('{!Order.SAP_Status__c}');
but if i want to display using the standard fields like Accountname, accountNumber, how will get these value.
Thanks,
Smurfet
On the Order object I have a requirement to create custom button to check if the custom field(check box) in object Account object is check or not. Can I do this using Javascript only if yes, can anybody show me? if no and i need to do a VF and controller on this please let me know
Example of displaying custom field in an order:
alert('{!Order.SAP_Status__c}');
but if i want to display using the standard fields like Accountname, accountNumber, how will get these value.
Thanks,
Smurfet
Step1 : Create a checkbox field in Account. In my case it is 'IsActive__c'
Step2 : Create one formula field in Order named 'IsAccountActive__c' with formula 'Account.IsActive__c'
Step3 : Create one Custom Button with below code
Let me know if you need further help.
Please close the thread marking this answer as Best Answer if it really helped. Closing the thread help others finding the correct answer.
All Answers
Step1 : Create a checkbox field in Account. In my case it is 'IsActive__c'
Step2 : Create one formula field in Order named 'IsAccountActive__c' with formula 'Account.IsActive__c'
Step3 : Create one Custom Button with below code
Let me know if you need further help.
Please close the thread marking this answer as Best Answer if it really helped. Closing the thread help others finding the correct answer.
Either way though, I don't understand what the challenge is with accessing the standard fields, can't you just use something like Order.Account.Whatever? Also, both Account Name and Account Number are fields that are already on the Order object so no cross-object formula is needed for those.
It works and thank you. how to close the thread.
Jason,
I can see on the UI that Account Name and Account Number are there in the Order standard fields but when I do my SOQL I cannot see this Account No and Account Name but I see Account ID. Can you please help me how to access in the SOQL?
I am new here so thanks for bearing with me.
Thanks,
Smurfet
My program works fine with or without this:
{!REQUIRESCRIPT("/soap/ajax/25.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/25.0/apex.js")}
May I know what is the relevance of this? My worry is what is going to happen if the version changes to much higher, is there going to be an impact on my program.
Thanks,
Mary
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_and_ajax.htm