Should Component Ids  be less than 7 characters?

Hi,
When I name the ids of various ADF Faces components more then 7 characters, the jdev compiler shoots out warning messages that component Ids should be less than 7 for optimal performance.
Is this correct? What implications does it have if all the component Ids are less than 7 characters long?
regards,
Ansuman

Simon is correct on all counts.
The choice of 7 as the upper limit is fairly arbitrary. We were running into cases internally where ADF Faces users were choosing very long/descriptive (15-20 character) ids for naming containers. This ended up showing up during server-side profiling, and also resulted page content size bloat, especially for ids of root naming containers like page templates which appear everywhere. The audit rule was added to help clue folks in to the fact that there are consequences when choosing long ids.
Personally, if I were designing a page, I would always choose very short (eg. 1-2 characters) ids for my naming containers (and relatively short ids for anything that is going to be stamped repeatedly).
BTW, the audit rules are configurable. If you happen to be unhappy with a particular audit rule, you can disable it. See Preferences->Audit->Profiles->Rules->ADF Faces->Check for long ids on naming containers. And of course, you can also add your own audit rules to reflect your preferred coding standards.
Andy

Similar Messages

  • Why should texture size be less than power of 2?

    Hi!
    I just read in the packagerforiphone_devguide.pdf
    Make bitmaps in sizes that are close to, but less than, 2^n by 2^m bits. The dimensions do not have to be power of 2,
    but they should be close to a power of 2, without being larger. For example, a 31-by-15–pixel image renders faster
    than a 33-by-17–pixel image. (31 and 15 are just less than powers of 2: 32 and 16.) Such images also use memory
    more efficiently.
    can someone explain me this? As Gamedeveloper i'm used to have power of 2 textures. why should they be smaller than power of 2 instead of exactly power of 2?

    I have read that too, and it doesn't make sense. The article would have been a lot clearer if they had used 32x16 as the second example, instead of 33x17. Like you, I would almost expect advice that said to not exceed a power of 2, but it does't seem right to say that the exact power of 2 isn't recommended either.
    Hey, I just found an earlier passage that pretty well states that we're right, on page 34:
    "The GPU uses memory allocations that are powers of 2 for each dimension of the bitmap image. For example, the GPU can reserve memory in 512 x 1024 or 8 x 32 sizes. So a 9 x 15-pixel image takes up the same amount of memory as a 16 x 16-pixel image. For cached display objects, you may want to use dimensions that are close to powers of 2 (but not more) in each direction. For example, it is more efficient to use a 32 x 16-pixel display object than a 33 x 17-pixel display object."
    So there you go, a 32x16 bitmap does use less memory than a 33x17 bitmap.
    I think, or hope, that the later part was just making the point that you don't have to use exact powers of 2, but in doing so you want to not go over the power of 2. Hence using examples of 31x15 and 33x17. They didn't use 32x16 as an example because those are powers of 2, which wasn't what was being illustrated.

  • Should I settle for less than what I am paying for...

    A couple of months ago I upgraded to BT Infinity 1 Unlimited. The package was for speed of between 25 mb to 35mb.
    As I was only getting on average 15 to 16 mb  on one occasion 12.8mb. I rang and BT who sent an engineer out. On checking the HD box the engineer made improvements at the box. and now sometimes I get between19mb to 21mb. The engineer said that as the box is 436 metres away from my house I would never be able to get even the lowest speed of 25 mbps.
    I have just run the BTW TEST which reads as follows
    Download speed 20.90
    MAX 22.9
    For your connection the acceptable range of speeds is 16.3mhps--22.9mhps.
    Upload speed during test 3.75mbps
    Upstream rate IP profile for your line is 10mbps.
    Do you think I should settle for less than what I am paying for.
    Solved!
    Go to Solution.

    Thanks for your reply,
    I have been with bt for over 40 years and have great service from them. I know a lot of other users have bigger problems.
    It was just that the advert on line said 25 to 35 mhps and I was hopeing that I would not have to keep watching the little circle going round and round before opening a page.
    I buy and sell racecards on ebay and most times bid on things in the last few seconds and slow turning of the pages does  not help.  , 

  • GRN Qty should be less than Sub contracting Challan Qty

    Hi Friends,
    When we put Sub Contract Challn at the time of receving Sub Contract material MIGO, system should pick up challn Quty, or System should accept less qty than Challan Qty.
    Can we do the same ?
    Please help me.
    Thanks in Advance
    Yogesh

    HI,
    Yes GRN Qty should be same or less  than Sub contracting Challan Qty, system will allow you do the reconcilation with J1ifq or if the challan qty less then GRN quantity at the time system wont allow you to do the reconcilation
    Regards
    Pramod

  • I have a manual that contains headings and index entries that contain less than and greater than characters, and . The Publish to Responsive HTML5 function escapes these correctly in the main body of the text but does not work correctly in either the C

    I have a manual that contains headings and index entries that contain less than and greater than characters, < and >. The Publish to Responsive HTML5 function escapes these correctly in the main body of the text but does not work correctly in either the Contents or the Index of the generated HTML. In the Contents the words are completely missing and in the index entries the '\' characters that are required in the markers remain in the entry but the leading less than symbol and the first character of the word is deleted; hence what should appear as <dataseries> appears as \ataseries\>. I believe this is a FMv12 bug. Has anyone else experienced this? Is the FM team aware and working on a fix. Any suggestions for a workaround?

    The Index issue is more complicated since in order to get the < and > into the index requires the entry itself to be escaped. So, in order to index '<x2settings>' you have to key '\<x2settings\>'. Looking at the generated index entry in the .js file we see '<key name=\"\\2settings\\&gt;\">. This is a bit of a mess and produces an index entry of '\2settings\>'. This ought to be '<key name=\"&amp;lt;x2settings&amp;gt;\" >'. I have tested this fix and it works - but the worst of it is that the first character of the index entry has been stripped out. Consequently I cannot fix this with a few global changes - and I have a lot of index entries of this type. I'm looking forward to a response to this since I cannot publish this document in its current state.  

  • When I go to Preview to view a photo it shows up for less than a second then disappears and just leaves a gray box where the photo should be. iMac (Retina 5K, 27-inch, Late 2014). I need Preview for work.

    After the OS X Yosemite 10.10.3 update When I go to use Preview to view a photo it shows up for less than a second then disappears and just leaves a gray box where the photo should be. iMac (Retina 5K, 27-inch, Late 2014). I need Preview for work.

    1. This procedure is a diagnostic test. It changes nothing, for better or worse, and therefore will not, in itself, solve the problem. But with the aid of the test results, the solution may take a few minutes, instead of hours or days.
    The test works on OS X 10.7 ("Lion") and later. I don't recommend running it on older versions of OS X. It will do no harm, but it won't do much good either.
    Don't be put off by the complexity of these instructions. The process is much less complicated than the description. You do harder tasks with the computer all the time.
    2. If you don't already have a current backup, back up all data before doing anything else. The backup is necessary on general principle, not because of anything in the test procedure. Backup is always a must, and when you're having any kind of trouble with the computer, you may be at higher than usual risk of losing data, whether you follow these instructions or not.
    There are ways to back up a computer that isn't fully functional. Ask if you need guidance.
    3. Below are instructions to run a UNIX shell script, a type of program. As I wrote above, it changes nothing. It doesn't send or receive any data on the network. All it does is to generate a human-readable report on the state of the computer. That report goes nowhere unless you choose to share it. If you prefer, you can act on it yourself without disclosing the contents to me or anyone else.
    You should be wondering whether you can believe me, and whether it's safe to run a program at the behest of a stranger. In general, no, it's not safe and I don't encourage it.
    In this case, however, there are a couple of ways for you to decide whether the program is safe without having to trust me. First, you can read it. Unlike an application that you download and click to run, it's transparent, so anyone with the necessary skill can verify what it does.
    You may not be able to understand the script yourself. But variations of it have been posted on this website thousands of times over a period of years. The site is hosted by Apple, which does not allow it to be used to distribute harmful software. Any one of the millions of registered users could have read the script and raised the alarm if it was harmful. Then I would not be here now and you would not be reading this message. See, for example, this discussion.
    Nevertheless, if you can't satisfy yourself that these instructions are safe, don't follow them. Ask for other options.
    4. Here's a general summary of what you need to do, if you choose to proceed:
    ☞ Copy a particular line of text to the Clipboard.
    ☞ Paste into the window of another application.
    ☞ Wait for the test to run. It usually takes a few minutes.
    ☞ Paste the results, which will have been copied automatically, back into a reply on this page.
    These are not specific instructions; just an overview. The details are in parts 7 and 8 of this comment. The sequence is: copy, paste, wait, paste again. You don't need to copy a second time.
    5. Try to test under conditions that reproduce the problem, as far as possible. For example, if the computer is sometimes, but not always, slow, run the test during a slowdown.
    You may have started up in "safe" mode. If the system is now in safe mode and works well enough in normal mode to run the test, restart as usual. If you can only test in safe mode, do that.
    6. If you have more than one user, and the one affected by the problem is not an administrator, then please run the test twice: once while logged in as the affected user, and once as an administrator. The results may be different. The user that is created automatically on a new computer when you start it for the first time is an administrator. If you can't log in as an administrator, test as the affected user. Most personal Macs have only one user, and in that case this section doesn’t apply. Don't log in as root.
    7. Load this linked web page (on the website "Pastebin.") The title of the page is "Diagnostic Test." Below the title is a text box headed by three small icons. The one on the right represents a clipboard. Click that icon to select the text, then copy it to the Clipboard on your computer by pressing the key combination command-C.
    If the text doesn't highlight when you click the icon, select it by triple-clicking anywhere inside the box. Don't select the whole page, just the text in the box.
    8. Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad and start typing the name.
    Click anywhere in the Terminal window to activate it. Paste from the Clipboard into the window by pressing command-V, then press return. The text you pasted should vanish immediately.
    9. If you see an error message in the Terminal window such as "Syntax error" or "Event not found," enter
    exec bash
    and press return. Then paste the script again.
    10. If you're logged in as an administrator, you'll be prompted for your login password. Nothing will be displayed when you type it. You will not see the usual dots in place of typed characters. Make sure caps lock is off. Type carefully and then press return. You may get a one-time warning to be careful. If you make three failed attempts to enter the password, the test will run anyway, but it will produce less information. If you don't know the password, or if you prefer not to enter it, just press return three times at the password prompt. Again, the script will still run.
    If you're not logged in as an administrator, you won't be prompted for a password. The test will still run. It just won't do anything that requires administrator privileges.
    11. The test may take a few minutes to run, depending on how many files you have and the speed of the computer. A computer that's abnormally slow may take longer to run the test. While it's running, a series of lines will appear in the Terminal window like this:
    [Process started]
            Part 1 of 8 done at … sec
            Part 8 of 8 done at … sec
            The test results are on the Clipboard.
            Please close this window.
    [Process completed]
    The intervals between parts won't be exactly equal, but they give a rough indication of progress. The total number of parts may be different from what's shown here.
    Wait for the final message "Process completed" to appear. If you don't see it within about ten minutes, the test probably won't complete in a reasonable time. In that case, press the key combination control-C or command-period to stop it and go to the next step. You'll have incomplete results, but still something.
    12. When the test is complete, or if you stopped it because it was taking too long, quit Terminal. The results will have been copied to the Clipboard automatically. They are not shown in the Terminal window. Please don't copy anything from there. All you have to do is start a reply to this comment and then paste by pressing command-V again.
    At the top of the results, there will be a line that begins with the words "Start time." If you don't see that, but instead see a mass of gibberish, you didn't wait for the "Process completed" message to appear in the Terminal window. Please wait for it and try again.
    If any private information, such as your name or email address, appears in the results, anonymize it before posting. Usually that won't be necessary.
    13. When you post the results, you might see an error message on the web page: "You have included content in your post that is not permitted," or "You are not authorized to post." That's a bug in the forum software. Please post the test results on Pastebin, then post a link here to the page you created.
    14. This is a public forum, and others may give you advice based on the results of the test. They speak for themselves, not for me. The test itself is harmless, but whatever else you're told to do may not be. For others who choose to run it, I don't recommend that you post the test results on this website unless I asked you to.
    Copyright © 2014, 2015 by Linc Davis. As the sole author of this work (including the referenced "Diagnostic Test"), I reserve all rights to it except as provided in the Use Agreement for the Apple Support Communities website ("ASC"). Readers of ASC may copy it for their own personal use. Neither the whole nor any part may be redistributed.

  • Web Application name does not accept less than 3 characters

    Hi,
              I recently migrated from WLS6.0 to WLS6.1 in NT 4.0 and found that, if the Web Application name is less than 3 characters, server does not report any errors, but could not access the web application. This was not a problem in WLS 6.0.
              If anyone faced this problem or it is documented in WL6.1 please let me know.
              Thanks,
              Cabir
              

    It's been reported and I believe that support can provide you with a patch.
              Peace,
              Cameron Purdy
              Tangosol, Inc.
              Clustering Weblogic? You're either using Coherence, or you should be!
              Download a Tangosol Coherence eval today at http://www.tangosol.com/
              "Cabir" <[email protected]> wrote in message
              news:3c802f4f$[email protected]..
              > Hi,
              >
              > I recently migrated from WLS6.0 to WLS6.1 in NT 4.0 and found that, if the
              Web Application name is less than 3 characters, server does not report any
              errors, but could not access the web application. This was not a problem in
              WLS 6.0.
              >
              > If anyone faced this problem or it is documented in WL6.1 please let me
              know.
              >
              > Thanks,
              > Cabir
              

  • SharePoint 2010, Visual Studio 2010, Packaging a solution - The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

    Hi,
    I have a solution that used to contain one SharePoint 2010 project. The project is named along the following lines:
    <Company>.<Product>.SharePoint - let's call it Project1 for future reference. It contains a number of features which have been named according
    to their purpose, some are reasonably long and the paths fairly deep. As far as I am concerned we are using sensible namespaces and these reflect our company policy of "doing things properly".
    I first encountered the following error message when packaging the aforementioned SharePoint project into a wsp:
    "The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters."
    I went through a great deal of pain in trying to rename the project, shorten feature names and namespaces etc... until I got it working. I then went about gradually
    renaming everything until eventually I had what I started with, and it all worked. So I was none the wiser...not ideal, but I needed to get on and had tight delivery timelines.
    Recently we wanted to add another SharePoint project so that we could move some of our core functinality out into a separate SharePoint solution - e.g. custom workflow
    error logging. So we created another project in Visual Studio called:
    <Company>.<Product>.SharePoint.<Subsystem> - let's call it Project2 for future reference
    And this is when the error has come back and bitten me! The scenario is now as follows:
    1. project1 packages and deploys successfully with long feature names and deep paths.
    2. project2 does not package and has no features in it at all. The project2 name is 13 characters longer than project1
    I am convinced this is a bug with Visual Studio and/or the Package MSBuild target. Why? Let me explain my findings so far:
    1. By doing the following I can get project2 to package
    In Visual Studio 2010 show all files of project2, delete the obj, bin, pkg, pkgobj folders.
    Clean the solution
    Shut down Visual Studio 2010
    Open Visual Studio 2010
    Rebuild the solution
    Package the project2
    et voila the package is generated!
    This demonstrates that the package error message is in fact inaccurate and that it can create the package, it just needs a little help, since Visual Studio seems to
    no longer be hanging onto something.
    Clearly this is fine for a small time project, but try doing this in an environment where we use Continuous Integration, Unit Testing and automatic deployment of SharePoint
    solutions on a Build Server using automated builds.
    2. I have created another project3 which has a ludicrously long name, this packages fine and also has no features contained within it.
    3. I have looked at the length of the path under the pkg folder for project1 and it is large in comparison to the one that is generated for project2, that is when it
    does successfully package using the method outlined in 1. above. This is strange since project1 packages and project2 does not.
    4. If I attempt to add project2 to my command line build using MSBuild then it fails to package and when I then open up Visual Studio and attempt to package project2
    from the Visual Studio UI then it fails with the path too long error message, until I go through the steps outlined in 1. above to get it to package.
    5. DebugView shows nothing useful during the build and packaging of the project.
    6. The error seems to occur in
    CreateSharePointProjectService target called at line 365 of
    Microsoft.VisualStudio.SharePoint.targetsCurrently I am at a loss to work out why this is happening? My next task is to delete
    project2 completely and recreate it and introduce it into my Visual Studio solution.
    Microsoft, can you confirm whether this is a known issue and whether others have encountered this issue? Is it resolved in a hotfix?
    Anybody else, can you confirm whether you have come up with a solution to this issue? When I mean a solution I mean one that does not mean that I have to rename my namespaces,
    project etc... and is actually workable in a meaningful Visual Studio solution.

    Hi
    Yes, I thought I had fixed this my moving my solution from the usual documents  to
    c:\v2010\projectsOverflow\DetailedProjectTimeline
    This builds ok, but when I come to package I get the lovely error:
    Error 2 The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. C:\VS2010\ProjectsOverflow\DetailedProjectTimeline\VisualDetailedProjectTimelineWebPart\Features\Feature1\Feature1.feature VisualDetailedProjectTimeline
    Now, the error seems to be related to 
    Can anyone suggest what might be causing this. Probably some path in an XML file somewhere. Here is my prime suspect!
    <metaData>
    <type name="VisualDetailedProjectTimelineWebPart.VisualProjectTimelineWebPart.VisualProjectTimeline, $SharePoint.Project.AssemblyFullName$" />
    <importErrorMessage>$Resources:core,ImportErrorMessage;</importErrorMessage>
    </metaData>
    <data>
    <properties>
    <property name="Title" type="string">VisualProjectTimelineWebPart</property>
    <property name="Description" type="string">My Visual WebPart</property>
    </properties>
    </data>
    </webPart>
    </webParts>
    .... Unless I can solve this I will have to remove the project and recreate but with simple paths. Tho I will be none the wiser if I come across this again.
    Daniel

  • TFS Build Error - Exception Message: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters

    I am trying to set-up CI of Orchard CMS and deploy it on Azure using TF service. I am stuck at following error for path being
    longer than 260 characters. However, when counted the total characters in path are 235. Please see the below error :
    Other Errors and Warnings
    1 error(s), 1 warning(s)
    Exception Message: TF400889: The following path contains more than the allowed 259 characters: drop/_PublishedWebsites/Orchard.Web_Package/Archive/Content/C_C/a/src/projects/Orchard/dev/DevAltaf/Orchard/src/Orchard.Web/obj/Debug/Package/PackageTmp/Modules/BrentApart.BannerManager/Scripts/controllers/bannerAssignmentController.js. Specify a shorter path. (type VssServiceException)
    Exception Stack Trace: at Microsoft.TeamFoundation.Build.Workflow.Activities.FileContainerDropProvider.EndCopyDirectory(IAsyncResult result)
    at Microsoft.TeamFoundation.Build.Workflow.Activities.CopyDirectory.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
    at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
    Inner Exception Details:
    Exception Message: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. (type PathTooLongException)
    Did anyone came across such issue while deploying Orchard on Azure with TF service? If yes, how did you sort this freaking error?
    Thanks,
    Altaf B.

    Hi AltafB,
    For your situation, you can short the path for the source code. Or use a short path for build agent folder in your build definition. You can refer to the links below to solve your problem:
    http://blogs.msdn.com/b/aaronhallberg/archive/2007/06/20/team-build-and-260-character-paths.aspx
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/1638a5f0-9321-4ff9-9ee7-6d347badb972/please-some-solution-to-the-specified-path-file-name-or-both-are-too-long?forum=tfsbuild
    Besides, since you deploy Orchard to Azure, you can also publish it directly using publish profile in Visual Stduio or WebMatrix directly.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • SQL query to populate the records, the maximum processed should be less than 10 records per week.

    Dear All,
    I have a requirement, to write a SQL query to populate the records which are inserted less than 10 no of records.
    The tables has the cretaed_date column and along with other key column which will have unique values.
    Ex1:  The user might have inserted records from application, per week basis, between the date range '01-jun-2013' - 08-jun-2013  , the no of records created by the user during this week may be less than 10 records or more.
    But I want to populate the records by giving date range that too, it should pick the records the count which fall with in 10 records.
    I dont want the query to populate the records if the user has inserted more than 10 records in a week.
    Ex2:
    User 1 has created 15 records during the week 1 ( the query should not populate this ).
    User 2: has cretaed less than 10 records from the UI during the week 2. ( This details should get populated ).
    Thanks

    Use COUNT to find how many rows where inserted in a week.
    If this does not answer your question then please read Re: 2. How do I ask a question on the forums? And provide necessary details.

  • Get-ChildItem : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

    Hi, Im trying to get the whole path in my server, so i tried that with this following code
    Get-ChildItem $sourceFolder  -Recurse | ?{$_.PsIsContainer} |Get-Acl
    But then, it showed me somtehing like this :
    Get-ChildItem : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
     I tried to find the solver everywhere and mostly they propose to change the path name, which is impossible, since I am working with my company server, and those folder have already there before i start to work here, then the other ask me to use robocopy,
    but all of the trick just dont work
    is there any way to solve this problem? thanks

    There is no simple solution to this. And it is not a limitation of powershell itself, but of the underlying NTFS file system.
    If the problem is that a folder with a name longer than 248 exists anywhere within your directory structure, you are hooped.
    If the problem is that some fully qualified path names exceed 260 characters, then, in those cases, the solution already given is to create a psdrive partway up the path from the drive letter or server/share root of the path. Unfortunately, the output produced
    will be relative to that psdrive and not to what is specified as the $sourcefolder.
    unless you already know where those problematic paths are, you might consider trying to trap those errors and have your script figure out where it needs to create psdrives. You might then be able to calculate the equivalent path for each file or folder and
    output that. the programming effort would be simpler to just created a psdrive for each folder encountered, however I expect that would be very inefficient.
    Al Dunbar -- remember to 'mark or propose as answer' or 'vote as helpful' as appropriate.

  • PR Date Should be less than PO date

    Hi
    I have done the change in message type to control PO date at the time of creation, now PO can be created only in current date but if at a later stage somebody has been created one more PR and change the PO and add one more line item from this PR then PR date is greater than PO date.
    So this is objectionable and I want to control this i.e. PR date should be less than PO date.
    Please guide how can i achieve this?
    Regards
    Ajay Goel

    Hello,
    Ajay if u you want to restrict the PO can be created only in current date then u can take help of your ABAPER because its possible through BADI.
    If you want to add the other line item in PO Or Use Tcode Me22n you can not change the document date that time bcoz its disable check it.

  • AR Invoice date should not be less than delivery date

    How can i make an alert for user when they will prepare AR Invoice?
    Example:
    If Delivery date is 01-10-2010 and Invoice date should be later or same but not less than delivery date(01-10-2010).
    if Invoice date is less than delivery date then This data should not be added into the database.
    So there is any way to stop this error.
    Thanks
    Mizan

    Dear Bala,
    Here is the SP:
    set ANSI_NULLS ON
    set QUOTED_IDENTIFIER ON
    go
    ALTER proc [dbo].[SBO_SP_PostTransactionNotice]
    @object_type nvarchar(20),                     -- SBO Object Type
    @transaction_type nchar(1),               -- [A]dd, <u>pdate, [D]elete, [C]ancel, C[L]ose
    @num_of_cols_in_key int,
    @list_of_key_cols_tab_del nvarchar(255),
    @list_of_cols_val_tab_del nvarchar(255)
    AS
    begin
    -- Return values
    declare @error  int                    -- Result (0 for no error)
    declare @error_message nvarchar (200)           -- Error string to be displayed
    select @error = 0
    select @error_message = N'Ok'
    --     ADD     YOUR     CODE     HERE
    If @object_type='13' and @transaction_type='A'
    BEGIN
    If Exists (Select distinct 'error' from [dbo].[OINV] T0 Inner Join INV1 T1
    On T0.DocEntry=T1.DocEntry Inner Join DLN1 T2 On T1.BaseEntry=T2.DocEntry
    Where T0.DocDate<T2.DocDate
    And T0.DocEntry = @list_of_cols_val_tab_del)
    BEGIN
    Select @error = -1,
    @error_message = 'DocDate for Invoice Should not be Less than Del. Date. So You can not Add this Doc'
    End
    End
    -- Select the return values
    select  @error,@error_message
    end
    Regards,
    Mizan

  • Date should not be  less than current date.

    Hello, I have a form.It has an item called end_date. I want to have validation of end_date in such a way that "end_date should not less than current date". Any tips would be helpful.
    Thanks in advance.

    jwellsnh wrote:
    Pravish,
    A dynamic action executing JavaScript can do this:
    Create a Dynamic Action:
    Event Before Page Submit
    Condition JavaScript Expression
    Value $v('P1_END_DATE')<$v('P1_BEGIN_DATE')In this scenario; P1_BEGIN_DATE would need to default to sysdate and could be a hidden item on the page.
    Jeff
    Edited by: jwellsnh on Jul 19, 2012 9:50 AMMaybe I'm missing something but isn't this just a use case for a common-or-garden validation? Would be interested to know why you thought of javascript rather than normal built-in functionality (not meant as a criticism incidentally!) - is javascript your first port of call when it comes to APEX?
    I'd also watch out for comparisons to SYSDATE - remember that SYSDATE includes the current time, so you'd need to take that into account (maybe you could make use of the TRUNC function to remove the time element?). Indeed, would javascript evaluate that expression as comparing two dates (I know Javascript evaluates variables byDuck Typing but does this work in practice)?

  • GR date lesser than the PO date, the system should show an error message.

    Dear Gurus,
                         if anybody puts GR date lesser than the PO date, system should display error this happens because the system allows back dated posting of 101 MVT in MIGO.Similarly the IR date should not be less than the GR date. This happens because the system allows back dated posting of MIRO also.
    Regards
    ASHOK K

    Hi,
    Use the badi MB_DOCUMENT_BADI  and compare dates of EKKO-BEDAT and MKPF-BLDAT for MIGO.
    USe the badi IF_EX_MRM_INVOICE_UPDATE PROCESS_AT_ and compare the dates of MKPF-BLDAT and RBKP-BLDAT while saving the invoice for checking the back dated entries and throw an error message.
    Regards,
    Bharat

Maybe you are looking for