Upgrade to Pro — share decks privately, control downloads, hide ads and more …

試して学ぶ数式項目・入力規則 / Salesforce Formulas and Valida...

Shun Kosaka
October 31, 2019

試して学ぶ数式項目・入力規則 / Salesforce Formulas and Validation Rules Hands on

Shun Kosaka

October 31, 2019
Tweet

More Decks by Shun Kosaka

Other Decks in Technology

Transcript

  1. ✏ Salesforce Trailhead Playground Developer Edition 1 ✋ • •

    • https://sli.do/ # 8230 2019 10 31 Salesforce TERAKOYA FORCE (Advanced + )
  2. IF(AND(ISBLANK(Terakoya_c), IsActive = true ), ‘ ’, ‘ ’ )

    IF( AND( ISBLANK(Terakoya__c), IsActive = true ), ‘ ’, ‘ ’ ) https://help.salesforce.com/articleView?id=customize_formula_best_practices.htm&type=5 ( ) IF AND OR CASE • • = true
  3. /

  4. / Step2. / MONTH(LastModi edDate ) = MONTH(DATEVALUE(LastModi edDate)) =

    12 DATEVALUE(2017/12/18 16:10) = 2017/12/18 STEP1 MONTH
  5. / Step4. / TEXT(12) = 12 MONTH(DATEVALUE(LastModi edDate)) & =

    TEXT(MONTH(DATEVALUE(LastModi edDate))) & = 12 & = 12
  6. 1. Playground Developer Edition 2. packaging/installPackage.apexp?p0=04t2v000005aNhH 3. URL lightning.force.com/ 2

    https://brave-badger-180775-dev-ed.lightning.force.com/packaging/instalackage.apexp?p0=04t2v000005aNhH URL OK 4.
  7. 1 OK NG AND( ISPICKVAL(PRIORVALUE(StageName), ‘Value Proposition’), OR( ISPICKVAL(StageName, ‘Needs

    Analysis’), ISPICKVAL(StageName, ‘Qualification’), ISPICKVAL(StageName, ‘Prospecting’) ) ) Value Proposition …
  8. 1 OK NG AND( ISPICKVAL(PRIORVALUE(StageName), ‘Value Proposition’), OR( ISPICKVAL(StageName, ‘Needs

    Analysys’), ISPICKVAL(StageName, ‘Qualification’), ISPICKVAL(StageName, ‘Prospecting’) ) ) Value Proposition …
  9. 1 CASE(StageName, ‘Prospecting’, 1, ‘Qualification, 2, ‘Needs Analysis, 3, …

    … ‘Closed Won’, 9, ‘Closed Lost’,9, 0 ) CASE(PRIOVALUE(StageName), ‘Prospecting’, 1, ‘Qualification, 2, ‘Needs Analysis, 3, … … ‘Closed Won’, 9, ‘Closed Lost’, 9, 0 ) 1 2 3 4 5 6 7 8 9 CASE 0縄 OK
  10. 2 Label Cost__c DeveloperName 500 Tokyo 600 Kanagawa 700 Others

    IF( Account.ShippingState = $CustomMetadata.Terakoya_Shipping_Cost__mdt.Tokyo.MasterLabel, $CustomMetadata.Terakoya_Shipping_Cost__mdt.Tokyo.Cost__c, $CustomMetadata.Terakoya_Shipping_Cost__mdt.Others.Cost__c ) (Terakoya_Shipping_Cost__mdt)
  11. 3 ( ) ⭕ ⭕ ⭕ ⭕ ⭕ ❌ ❌

    ShippingState <> ‘ ’ || ShippingState <> ‘ ’ || ShippingState <> ‘ ’ || … 44 … …
  12. 3 ( ) NOT( CONTAINS( ‘ : : : :

    : : : : : : : : : : : : : 結 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : ’ , ShippingState ) ) || LEN(ShippingState) < 3 = ShippingState 3 ( ) OR IF CONTAINS