• Gaby Faby
  • NEWBIE
  • -1 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
Hello, 

I am trying to move my company's org from classic to lightning. I have completed the Lightning experience readiness check and configuration converter. Unfortunately, I get a manual (code error) on the configuration converter for a javascript button. Below are the recommendations and the original code written by someone before me.
  • Create a Lightning component. Then give users access by invoking access from a Lightning component action or using Lightning App Builder to add the Lightning component to a Lightning page. Learn More >
  • This button contains code for a conditional URL. Consider this customizable sample component as a replacement: redirectConditionalUrl.
Any help would be greatly appreciated. 

{!REQUIRESCRIPT("/soap/ajax/30.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/24.0/apex.js")} //alert("1"); var accId = '{!Opportunity.AccountId}'; if(accId != null && accId != ''){ var query = "SELECT Id,Special_Terms_and_Conditions__c from Account where id ='"+accId+"' limit 1"; var accTC = sforce.connection.query(query); //alert("2"); records = accTC.getArray("records"); //alert("2 GM"+records); if(records != null && records[0] != null) { // if there are OpportunityContract records, take the OppID of the first record //alert('This account associated with this Special Terms and Conditions : +records[0].Special_Terms_and_Conditions__c); var result = confirm('This account associated with this Special Terms and Conditions : '+records[0].Special_Terms_and_Conditions__c); if(result == true) { window.open("https://composer.congamerge.com?sessionId={!API.Session_ID}&serverUrl={!API.Partner_Server_URL_290}&id={!Opportunity.Id}&reportid=[camera]00O70000004WFig,[DVRs]00O70000004WFjP,[Wireless]00O70000004WFj0,[Accessories]00O70000004WFj5,[Software]00O70000004WFjA,[Cables]00O70000004WFjF","_blank"); } else{ } } } else{ window.open("https://composer.congamerge.com?sessionId={!API.Session_ID}&serverUrl={!API.Partner_Server_URL_290}&id={!Opportunity.Id}&reportid=[camera]00O70000004WFig,[DVRs]00O70000004WFjP,[Wireless]00O70000004WFj0,[Accessories]00O70000004WFj5,[Software]00O70000004WFjA,[Cables]00O70000004WFjF","_blank"); }
Done
Consider the following structure for the CMS workspace
Folder1
  |-Folder2
  |  |-Folder3
  |  |   |-Content1
  |  |-Content2
  |  |-Content3
  |-Content4
We need to access the content in any given folder and render it in the CMS component. Is there any method available to programmatically fetch the contents of the folder by providing folder id or name or any such folder identifier?

Hope someone can help.  Am writing a formula field in one object (B) where I want only the values associated with checkboxes on another object (A) to appear.  There may be one, two or even three checkboxes ticked in object A, so I would want some way of all the values which are ticked appearing in object B, but not the other values which are not ticked.

 

It seems that if I do an IF formula, I can only get the first ticked value in the field to appear, but not the other ticked values.  I tried using a "," separator so that a list of values would appear separated by a comma, but I couldn't get the syntax to work.  I would prefer to have each field labelled (Objective 1, Objective 2 etc), and was trying to think of a way for the field label itself not showing if the value was null, but I can't see a way to do that. This is my formula:

 

IF(Homework__r.Objective_1__c  = TRUE, Homework__r.Objectives_1__c,  IF(Homework__r.Objective_2__c  = TRUE, Homework__r.Objectives_2__c, IF(Homework__r.Objective_3__c  = TRUE, Homework__r.Objectives_3__c, IF(Homework__r.Objective_4__c  = TRUE, Homework__r.Objectives_4__c,  IF(Homework__r.Objective_5__c  = TRUE, Homework__r.Objectives_5__c, IF(Homework__r.Objective_6__c  = TRUE, Homework__r.Objectives_6__c, null))))))

 

Any help on this would really be appreciated.  Thanks!